Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkgs/os-specific/linux/libselinux/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, libsepol, pcre
, enablePython ? true, swig ? null, python ? null
, musl-fts
}:

assert enablePython -> swig != null && python != null;
Expand All @@ -18,7 +19,8 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libsepol pcre ]
++ optionals enablePython [ swig python ];
++ optionals enablePython [ swig python ]
++ optional stdenv.hostPlatform.isMusl musl-fts;

# Avoid this false warning:
# avc_internal.c: In function 'avc_netlink_receive':
Expand Down
17 changes: 17 additions & 0 deletions pkgs/os-specific/linux/musl/fts-setup-hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ftsLdflags() {
# The `depHostOffset` describes how the host platform of the dependencies
# are slid relative to the depending package. It is brought into scope of
# the environment hook defined as the role of the dependency being applied.
case $depHostOffset in
-1) local role='BUILD_' ;;
0) local role='' ;;
1) local role='TARGET_' ;;
*) echo "cc-wrapper: Error: Cannot be used with $depHostOffset-offset deps" >2;
return 1 ;;
esac

export NIX_${role}LDFLAGS+=" -lfts"
}

addEnvHooks "$hostOffset" ftsLdflags

2 changes: 2 additions & 0 deletions pkgs/os-specific/linux/musl/fts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ stdenv.mkDerivation rec {
};

nativeBuildInputs = [ autoreconfHook pkgconfig ];

setupHook = ./fts-setup-hook.sh;
}
5 changes: 3 additions & 2 deletions pkgs/tools/compression/xar/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, libxml2, openssl, zlib, bzip2 }:
{ stdenv, fetchurl, libxml2, openssl, zlib, bzip2, musl-fts }:

stdenv.mkDerivation rec {
version = "1.6.1";
Expand All @@ -9,7 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "0ghmsbs6xwg1092v7pjcibmk5wkyifwxw6ygp08gfz25d2chhipf";
};

buildInputs = [ libxml2 openssl zlib bzip2 ];
buildInputs = [ libxml2 openssl zlib bzip2 ]
++ stdenv.lib.optional stdenv.hostPlatform.isMusl musl-fts;

meta = {
homepage = https://mackyle.github.io/xar/;
Expand Down