Merge pull request #37885 from dtzWill/fix/musl-fts

musl-fts: setup-hook to add -lfts, use in xar and libselinux
wip/yesman
Will Dietz 6 years ago committed by GitHub
commit 73320be341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      pkgs/os-specific/linux/libselinux/default.nix
  2. 17
      pkgs/os-specific/linux/musl/fts-setup-hook.sh
  3. 2
      pkgs/os-specific/linux/musl/fts.nix
  4. 5
      pkgs/tools/compression/xar/default.nix

@ -1,5 +1,6 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, libsepol, pcre
, enablePython ? true, swig ? null, python ? null
, musl-fts
}:
assert enablePython -> swig != null && python != null;
@ -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':

@ -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

@ -11,4 +11,6 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
setupHook = ./fts-setup-hook.sh;
}

@ -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";
@ -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/;

Loading…
Cancel
Save