diff options
Diffstat (limited to 'pkgs/os-specific')
58 files changed, 512 insertions, 196 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/compat-setup-hook.sh b/pkgs/os-specific/bsd/netbsd/compat-setup-hook.sh index d47d602e2edb..81df09eba176 100644 --- a/pkgs/os-specific/bsd/netbsd/compat-setup-hook.sh +++ b/pkgs/os-specific/bsd/netbsd/compat-setup-hook.sh @@ -1,18 +1,6 @@ -setupCompatFlags() { - # 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 +# See pkgs/build-support/setup-hooks/role.bash +getHostRole - export NIX_${role}LDFLAGS+=" -lnbcompat" - export NIX_${role}CFLAGS_COMPILE+=" -DHAVE_NBTOOL_CONFIG_H" - export NIX_${role}CFLAGS_COMPILE+=" -include nbtool_config.h" -} - -addEnvHooks "$hostOffset" setupCompatFlags +export NIX_${role_pre}LDFLAGS+=" -lnbcompat" +export NIX_${role_pre}CFLAGS_COMPILE+=" -DHAVE_NBTOOL_CONFIG_H" +export NIX_${role_pre}CFLAGS_COMPILE+=" -include nbtool_config.h" diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index b4fb99504ef2..84d6926c50c7 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -167,7 +167,10 @@ let sha256 = "17phkfafybxwhzng44k5bhmag6i55br53ky1nwcmw583kg2fa86z"; version = "7.1.2"; - setupHook = ./compat-setup-hook.sh; + setupHooks = [ + ../../../build-support/setup-hooks/role.bash + ./compat-setup-hook.sh + ]; # override defaults to prevent infinite recursion nativeBuildInputs = [ makeMinimal ]; @@ -270,7 +273,10 @@ let runHook postInstall ''; - setupHook = ./fts-setup-hook.sh; + setupHooks = [ + ../../../build-support/setup-hooks/role.bash + ./fts-setup-hook.sh + ]; }; stat = netBSDDerivation { diff --git a/pkgs/os-specific/bsd/netbsd/fts-setup-hook.sh b/pkgs/os-specific/bsd/netbsd/fts-setup-hook.sh index 6b7064174931..5cf8c753aec3 100644 --- a/pkgs/os-specific/bsd/netbsd/fts-setup-hook.sh +++ b/pkgs/os-specific/bsd/netbsd/fts-setup-hook.sh @@ -1,16 +1,4 @@ -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 +# See pkgs/build-support/setup-hooks/role.bash +getHostRole - export NIX_${role}LDFLAGS+=" -lfts" -} - -addEnvHooks "$hostOffset" ftsLdflags +export NIX_${role_pre}LDFLAGS+=" -lfts" diff --git a/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix index 38215fa8f900..5c6d54aeb9c3 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/CarbonHeaders/default.nix @@ -1,7 +1,7 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; + dontBuild = true; installPhase = '' mkdir -p $out/include diff --git a/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix b/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix index 5bcf94a18cef..ad51f1df2bcd 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/CommonCrypto/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' mkdir -p $out/include/CommonCrypto cp include/* $out/include/CommonCrypto diff --git a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix index eef26f4b79a6..6cf7ee07b70b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix @@ -20,5 +20,6 @@ appleDerivation { postInstall = '' mv $out/usr/local/include $out/include + rm -rf $out/usr ''; } diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix index 0fa9294f2290..302a657992aa 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation, ed, unifdef }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - nativeBuildInputs = [ ed unifdef ]; installPhase = '' diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix index 40237b27bd26..d73dc8f3ec24 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation, ed, unifdef, Libc_old, Libc_10-9 }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - nativeBuildInputs = [ ed unifdef ]; # TODO: asl.h actually comes from syslog project now diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix index 2756857ba677..d3ffa1fa2834 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libinfo/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' substituteInPlace xcodescripts/install_files.sh \ --replace "/usr/local/" "/" \ diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix index b409a7347ef2..1a01d0321918 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libm/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' mkdir -p $out/include @@ -10,4 +8,4 @@ appleDerivation { cp Source/Intel/fenv.h $out/include cp Source/complex.h $out/include ''; -} \ No newline at end of file +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix index 810c8e8315a5..de691a056f3e 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libnotify/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' mkdir -p $out/include cp notify.h $out/include diff --git a/pkgs/os-specific/darwin/apple-source-releases/Librpcsvc/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Librpcsvc/default.nix index 512ec6253c78..7002f82fe561 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Librpcsvc/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Librpcsvc/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation, developer_cmds }: appleDerivation rec { - phases = [ "unpackPhase" "installPhase" ]; - buildInputs = [ developer_cmds ]; installPhase = '' diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix index 28406c9751dc..386480d62902 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix @@ -23,6 +23,7 @@ appleDerivation rec { (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include) done + (cd ${cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o) cat <<EOF > $out/include/TargetConditionals.h diff --git a/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix b/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix index edb7869269ac..4a155a4c403a 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/architecture/default.nix @@ -1,19 +1,11 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; + dontBuild = true; - postUnpack = '' - substituteInPlace $sourceRoot/Makefile \ - --replace "/usr/include" "/include" \ - --replace "/usr/bin/" "" \ - --replace "/bin/" "" - ''; + installFlags = [ "EXPORT_DSTDIR=/include/architecture" ]; - installPhase = '' - export DSTROOT=$out - make install - ''; + DSTROOT = "$(out)"; meta = with stdenv.lib; { maintainers = with maintainers; [ copumpkin ]; diff --git a/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix b/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix index c1a2acccaa97..37dffaa9b20e 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/copyfile/default.nix @@ -1,10 +1,9 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - + dontBuild = true; installPhase = '' mkdir -p $out/include/ cp copyfile.h $out/include/ ''; -} \ No newline at end of file +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix b/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix index 56b0d93f99be..ddadf1f3940b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/dyld/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' mkdir -p $out/lib $out/include ln -s /usr/lib/dyld $out/lib/dyld diff --git a/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix b/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix index af9493fe32e8..80d629dfa3e6 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/eap8021x/default.nix @@ -1,11 +1,10 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; - + dontBuild = true; installPhase = '' mkdir -p $out/Library/Frameworks/EAP8021X.framework/Headers cp EAP8021X.fproj/EAPClientProperties.h $out/Library/Frameworks/EAP8021X.framework/Headers ''; -} \ No newline at end of file +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix b/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix index c0e00ca1636e..86bc6e598f7d 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/launchd/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - # No clue why the same file has two different names. Ask Apple! installPhase = '' mkdir -p $out/include/ $out/include/servers @@ -11,4 +9,4 @@ appleDerivation { cp liblaunch/bootstrap.h $out/include/servers cp liblaunch/bootstrap.h $out/include/servers/bootstrap_defs.h ''; -} \ No newline at end of file +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix index a0201f9db2c1..826dbed1dfe0 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libclosure/default.nix @@ -1,10 +1,8 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' mkdir -p $out/include cp *.h $out/include/ ''; -} \ No newline at end of file +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix index c80e37575697..a43c00f7691b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libdispatch/default.nix @@ -1,8 +1,8 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - + dontConfigure = true; + dontBuild = true; installPhase = '' mkdir -p $out/include/dispatch $out/include/os diff --git a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix index 3cee697366bb..7ea9d51b4bf6 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix @@ -1,11 +1,11 @@ -{ stdenv, appleDerivation }: +{ stdenv, appleDerivation, autoreconfHook }: appleDerivation { - preConfigure = "cd libiconv" - + stdenv.lib.optionalString stdenv.hostPlatform.isiOS '' + postUnpack = "sourceRoot=$sourceRoot/libiconv"; - sed -i 's/darwin\*/ios\*/g' configure libcharset/configure - ''; + preConfigure = stdenv.lib.optionalString stdenv.hostPlatform.isiOS '' + sed -i 's/darwin\*/ios\*/g' configure libcharset/configure + ''; postInstall = '' mv $out/lib/libiconv.dylib $out/lib/libiconv-nocharset.dylib @@ -18,7 +18,10 @@ appleDerivation { -Wl,-reexport_library -Wl,$out/lib/libcharset.dylib ''; - setup-hook = ../../../../development/libraries/libiconv/setup-hook.sh; + setupHooks = [ + ../../../../build-support/setup-hooks/role.bash + ../../../../development/libraries/libiconv/setup-hook.sh + ]; meta = { platforms = stdenv.lib.platforms.darwin; diff --git a/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix index 65accc870d71..41b1bf74af9e 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libplatform/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' mkdir $out cp -r include $out/include diff --git a/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix index b4d8004d3e66..650c6415defc 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libpthread/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation, libdispatch, xnu }: appleDerivation { - phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; - propagatedBuildInputs = [ libdispatch xnu ]; installPhase = '' diff --git a/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix index a565971a6fa4..5a2cd33d8a03 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libresolv/default.nix @@ -1,8 +1,6 @@ { stdenv, appleDerivation, Libinfo, configd, mDNSResponder }: appleDerivation { - phases = [ "unpackPhase" "buildPhase" "installPhase" ]; - buildInputs = [ Libinfo configd mDNSResponder ]; buildPhase = '' diff --git a/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix index c943c2068e6d..a6f484ba4e8d 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix @@ -2,8 +2,6 @@ # all symbols are located in libSystem appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' mkdir -p $out/include cp *.h $out/include diff --git a/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix b/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix index ffc19801c5dc..17c24bebfda7 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/ppp/default.nix @@ -1,8 +1,7 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; - + dontBuild = true; installPhase = '' mkdir -p $out/include/ppp diff --git a/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix b/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix index 315f93bef084..8baf62dba01b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/removefile/default.nix @@ -1,10 +1,8 @@ { stdenv, appleDerivation }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' mkdir -p $out/include/ cp removefile.h checkint.h $out/include/ ''; -} \ No newline at end of file +} diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index dbe8bda5e1e0..0c908197acb8 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -103,15 +103,13 @@ let # include_next "unistd.h" #endif EOF - '' + stdenv.lib.optionalString useOld '' + cd cctools ''; # TODO: this builds an ld without support for LLVM's LTO. We need to teach it, but that's rather # hairy to handle during bootstrap. Perhaps it could be optional? - preConfigure = stdenv.lib.optionalString (!useOld) '' - cd cctools - '' + '' + preConfigure = '' sh autogen.sh ''; diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index c8e58dfbf6fb..cbbe4d5ca462 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -36,9 +36,7 @@ let substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man" ''; - # use 'if c then x else null' to avoid rebuilding - # patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ - patches = if stdenv.hostPlatform.isMusl then [ + patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ (fetchpatch { url = "https://git.alpinelinux.org/cgit/aports/plain/testing/apparmor/0002-Provide-missing-secure_getenv-and-scandirat-function.patch?id=74b8427cc21f04e32030d047ae92caa618105b53"; name = "0002-Provide-missing-secure_getenv-and-scandirat-function.patch"; @@ -55,7 +53,11 @@ let sha256 = "1m4dx901biqgnr4w4wz8a2z9r9dxyw7wv6m6mqglqwf2lxinqmp4"; }) # (alpine patches {1,4,5,6,8} are needed for apparmor 2.11, but not 2.12) - ] else null; + ]; + + # Set to `true` after the next FIXME gets fixed or this gets some + # common derivation infra. Too much copy-paste to fix one by one. + doCheck = false; # FIXME: convert these to a single multiple-outputs package? @@ -99,6 +101,8 @@ let mv $out/lib/python* $python/lib/ ''; + inherit doCheck; + meta = apparmor-meta "library"; }; @@ -131,6 +135,8 @@ let done ''; + inherit doCheck; + meta = apparmor-meta "user-land utilities"; }; @@ -154,6 +160,8 @@ let makeFlags = ''LANGS= USE_SYSTEM=1''; installFlags = ''DESTDIR=$(out) BINDIR=$(out)/bin''; + inherit doCheck; + meta = apparmor-meta "binary user-land utilities"; }; @@ -177,6 +185,8 @@ let makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include''; installFlags = ''DESTDIR=$(out) DISTRO=unknown''; + inherit doCheck; + meta = apparmor-meta "rule parser"; }; @@ -192,6 +202,8 @@ let makeFlags = ''USE_SYSTEM=1''; installFlags = ''DESTDIR=$(out)''; + inherit doCheck; + meta = apparmor-meta "PAM service"; }; @@ -204,6 +216,8 @@ let postPatch = "cd ./profiles"; installFlags = ''DESTDIR=$(out) EXTRAS_DEST=$(out)/share/apparmor/extra-profiles''; + inherit doCheck; + meta = apparmor-meta "profiles"; }; @@ -218,6 +232,8 @@ let cp -R ./kernel-patches/* "$out" ''; + inherit doCheck; + meta = apparmor-meta "kernel patches"; }; diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix index b844bf72d82a..ab75d38ba716 100644 --- a/pkgs/os-specific/linux/busybox/default.nix +++ b/pkgs/os-specific/linux/busybox/default.nix @@ -98,6 +98,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + doCheck = false; # tries to access the net + meta = with stdenv.lib; { description = "Tiny versions of common UNIX utilities in a single small executable"; homepage = https://busybox.net/; diff --git a/pkgs/os-specific/linux/hwdata/default.nix b/pkgs/os-specific/linux/hwdata/default.nix index 070ddfd77789..ebf7179d0814 100644 --- a/pkgs/os-specific/linux/hwdata/default.nix +++ b/pkgs/os-specific/linux/hwdata/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { configureFlags = "--datadir=$(prefix)/data"; + doCheck = false; # this does build machine-specific checks (e.g. enumerates PCI bus) + meta = { homepage = https://github.com/vcrhonek/hwdata; description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards"; diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix index a9e2cd7c5c1e..c1246e56dea1 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix @@ -3,13 +3,13 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.14.43"; + version = "4.14.44"; # branchVersion needs to be x.y extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version))); src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0jkikvjsrz7wk1zx57brzhhs15gbx022f1as4mn0017az7wc0gqk"; + sha256 = "1r68dvcyidnmr4d49rq58lidy32fijz08xzymxjwmxi5mzk5dcrf"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.16.nix b/pkgs/os-specific/linux/kernel/linux-4.16.nix index 5aebbd6c1e1b..c2bebb361342 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.16.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.16.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.16.11"; + version = "4.16.12"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))); @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "088931hgi5acm8nz19nd09skmamr3hhfb958374j30br6f94pfkd"; + sha256 = "078if7mmlq4csv0d7x7rpsc8zs7m6rpz75h6878r0d2silsphw2n"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index dd946c281316..409bc590ac06 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.4.132"; + version = "4.4.133"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0d06dv7maspgv33dlc6r8cb8pkpg4q2vxbpzz6285n0ah4fb05f4"; + sha256 = "0vhg23i49s4k8lbsrs8y6rvqjld84qgifmim5qcrndr6yj68fmk0"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index e550f4d44f8f..bf74d91a7d7b 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.9.102"; + version = "4.9.103"; extraMeta.branch = "4.9"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1icx253l8s158d1ccn594ddkqdxch8jr0w6kbj00jn1dlmms6mfi"; + sha256 = "1n4kqa0yf5svg8jk647h4awz3ygq696yi0agnmbz0alxnynffsij"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix b/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix index f9af5e5f6026..85ad00efcd67 100644 --- a/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix +++ b/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix @@ -3,9 +3,9 @@ with stdenv.lib; let - version = "4.14.42"; + version = "4.14.44"; revision = "a"; - sha256 = "09j36qhxs1z2qcxlpscg8yrif4qvm5ipbh7n6gxg58150yg9sl05"; + sha256 = "1alvhpwy9xzppwsag7qh1lkk3l4piyh2fv27w37il6gclja4dxkf"; # modVersion needs to be x.y.z, will automatically add .0 if needed modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))); diff --git a/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix b/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix index fea27b649f51..571b49245661 100644 --- a/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix +++ b/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix @@ -3,9 +3,9 @@ with stdenv.lib; let - version = "4.16.10"; + version = "4.16.12"; revision = "a"; - sha256 = "1dd9zislrlv24mnvzm2j9rfxnfp93lgf0pi48zpdglw5xpfwqm49"; + sha256 = "0gkgvhh2v5lca67xjmq512mqnfbln6lkk6hgigby2406b9w1b0sd"; # modVersion needs to be x.y.z, will automatically add .0 if needed modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))); diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index a6f399c0fba4..bbef2bd19aea 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -53,6 +53,9 @@ stdenv.mkDerivation { "-Wno-error=unused-const-variable" "-Wno-error=misleading-indentation" ]; + doCheck = false; # requires "sparse" + doInstallCheck = false; # same + separateDebugInfo = true; installFlags = "install install-man ASCIIDOC8=1 prefix=$(out)"; diff --git a/pkgs/os-specific/linux/kexectools/default.nix b/pkgs/os-specific/linux/kexectools/default.nix index 26f3d89c6628..f5f0916b90a6 100644 --- a/pkgs/os-specific/linux/kexectools/default.nix +++ b/pkgs/os-specific/linux/kexectools/default.nix @@ -2,14 +2,14 @@ stdenv.mkDerivation rec { name = "kexec-tools-${version}"; - version = "2.0.16"; + version = "2.0.17"; src = fetchurl { urls = [ "mirror://kernel/linux/utils/kernel/kexec/${name}.tar.xz" "http://horms.net/projects/kexec/kexec-tools/${name}.tar.xz" ]; - sha256 = "043hasx5b9zk7r7dzx24z5wybg74dpmh0nyns6nrnb3mmm8k642v"; + sha256 = "1ac20jws8iys9w6dpn4q3hihyx73zkabdwv3gcb779cxfrmq2k2h"; }; hardeningDisable = [ "format" "pic" "relro" ]; diff --git a/pkgs/os-specific/linux/libcap-ng/default.nix b/pkgs/os-specific/linux/libcap-ng/default.nix index d4625687c472..845e4e704eba 100644 --- a/pkgs/os-specific/linux/libcap-ng/default.nix +++ b/pkgs/os-specific/linux/libcap-ng/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { name = "libcap-ng-${version}"; # When updating make sure to test that the version with # all of the python bindings still works - version = "0.7.8"; + version = "0.7.9"; src = fetchurl { url = "${meta.homepage}/${name}.tar.gz"; - sha256 = "0pyhjxgsph3p28ayk4ynxab6wvzaqmazk1nkamx11m2w8jbzj6n2"; + sha256 = "0a0k484kwv0zilry2mbl9k56cnpdhsjxdxin17jas6kkyfy345aa"; }; nativeBuildInputs = [ swig ]; diff --git a/pkgs/os-specific/linux/libnl/default.nix b/pkgs/os-specific/linux/libnl/default.nix index f66df8163ff1..1caf91b0bb69 100644 --- a/pkgs/os-specific/linux/libnl/default.nix +++ b/pkgs/os-specific/linux/libnl/default.nix @@ -1,17 +1,18 @@ -{ stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig }: +{ stdenv, file, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig +, pythonSupport ? true, swig ? null, python}: -let version = "3.3.0"; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "libnl-${version}"; + version = "3.4.0"; src = fetchFromGitHub { repo = "libnl"; owner = "thom311"; rev = "libnl${lib.replaceStrings ["."] ["_"] version}"; - sha256 = "1796kyq2lkhz2802v9kp32vlxf8ynlyqgyw9nhmry3qh5d0ahcsv"; + sha256 = "1bqf1f5glwf285sa98k5pkj9gg79lliixk1jk85j63v5510fbagp"; }; - outputs = [ "bin" "dev" "out" "man" ]; + outputs = [ "bin" "dev" "out" "man" ] ++ lib.optional pythonSupport "py"; patches = stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch { @@ -19,7 +20,24 @@ stdenv.mkDerivation { sha256 = "0dd7xxikib201i99k2if066hh7gwf2i4ffckrjplq6lr206jn00r"; }); - nativeBuildInputs = [ autoreconfHook bison flex pkgconfig ]; + enableParallelBuilding = true; + + nativeBuildInputs = [ autoreconfHook bison flex pkgconfig file ] + ++ lib.optional pythonSupport swig; + + postBuild = lib.optionalString (pythonSupport) '' + cd python + ${python}/bin/python setup.py install --prefix=../pythonlib + cd - + ''; + + postFixup = lib.optionalString pythonSupport '' + mv "pythonlib/" "$py" + ''; + + passthru = { + inherit pythonSupport; + }; meta = with lib; { inherit version; diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix index bd84e121a7d6..8cda636e987d 100644 --- a/pkgs/os-specific/linux/lvm2/default.nix +++ b/pkgs/os-specific/linux/lvm2/default.nix @@ -59,6 +59,8 @@ stdenv.mkDerivation { }) ]; + doCheck = false; # requires root + # To prevent make install from failing. preInstall = "installFlags=\"OWNER= GROUP= confdir=$out/etc\""; diff --git a/pkgs/os-specific/linux/mmc-utils/default.nix b/pkgs/os-specific/linux/mmc-utils/default.nix index a17f687a2550..b491d5bbda7e 100644 --- a/pkgs/os-specific/linux/mmc-utils/default.nix +++ b/pkgs/os-specific/linux/mmc-utils/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { sha256 = "0hkdzc71pdnscbpdpgwljcchiyancarldjyd0w609sy18bky833x"; }; + makeFlags = "CC=${stdenv.cc.targetPrefix}cc"; + installPhase = '' make install prefix=$out mkdir -p $out/share/man/man1 diff --git a/pkgs/os-specific/linux/musl/fts-setup-hook.sh b/pkgs/os-specific/linux/musl/fts-setup-hook.sh index 3962dcb19a20..5cf8c753aec3 100644 --- a/pkgs/os-specific/linux/musl/fts-setup-hook.sh +++ b/pkgs/os-specific/linux/musl/fts-setup-hook.sh @@ -1,17 +1,4 @@ -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 +# See pkgs/build-support/setup-hooks/role.bash +getHostRole +export NIX_${role_pre}LDFLAGS+=" -lfts" diff --git a/pkgs/os-specific/linux/musl/fts.nix b/pkgs/os-specific/linux/musl/fts.nix index 0f16e8cc79bf..24d25de3a2d9 100644 --- a/pkgs/os-specific/linux/musl/fts.nix +++ b/pkgs/os-specific/linux/musl/fts.nix @@ -12,5 +12,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkgconfig ]; - setupHook = ./fts-setup-hook.sh; + setupHooks = [ + ../../../build-support/setup-hooks/role.bash + ./fts-setup-hook.sh + ]; } diff --git a/pkgs/os-specific/linux/net-tools/default.nix b/pkgs/os-specific/linux/net-tools/default.nix index ce287dc18415..42f745b02e30 100644 --- a/pkgs/os-specific/linux/net-tools/default.nix +++ b/pkgs/os-specific/linux/net-tools/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { ''; makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + "AR=${stdenv.cc.targetPrefix}ar" "BASEDIR=$(out)" "mandir=/share/man" "HAVE_ARP_TOOLS=1" diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index 904dae55c9cb..359d18690843 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap +{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap , sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers , buildEnv }: @@ -39,6 +39,18 @@ in stdenv.mkDerivation rec { ] ++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen"; + patches = lib.optionals stdenv.hostPlatform.isMusl [ + (fetchpatch { + url = "https://raw.githubusercontent.com/alpinelinux/aports/cb880042d48d77af412d4688f24b8310ae44f55f/main/nfs-utils/0011-exportfs-only-do-glibc-specific-hackery-on-glibc.patch"; + sha256 = "0rrddrykz8prk0dcgfvmnz0vxn09dbgq8cb098yjjg19zz6d7vid"; + }) + # http://openwall.com/lists/musl/2015/08/18/10 + (fetchpatch { + url = "https://raw.githubusercontent.com/alpinelinux/aports/cb880042d48d77af412d4688f24b8310ae44f55f/main/nfs-utils/musl-getservbyport.patch"; + sha256 = "1fqws9dz8n1d9a418c54r11y3w330qgy2652dpwcy96cm44sqyhf"; + }) + ]; + postPatch = '' patchShebangs tests diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix index e2d34abb70cc..0e7033972496 100644 --- a/pkgs/os-specific/linux/pam/default.nix +++ b/pkgs/os-specific/linux/pam/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, hostPlatform, fetchurl, fetchpatch, flex, cracklib }: +{ stdenv, buildPackages, hostPlatform, fetchurl, fetchpatch, flex, cracklib, db4 }: stdenv.mkDerivation rec { name = "linux-pam-${version}"; @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ flex ]; - buildInputs = [ cracklib ]; + buildInputs = [ cracklib db4 ]; enableParallelBuilding = true; @@ -55,9 +55,12 @@ stdenv.mkDerivation rec { sed -e 's/pam_rhosts//g' -i modules/Makefile.in ''; - meta = { - homepage = http://ftp.kernel.org/pub/linux/libs/pam/; + doCheck = false; # fails + + meta = with stdenv.lib; { + homepage = http://www.linux-pam.org/; description = "Pluggable Authentication Modules, a flexible mechanism for authenticating user"; - platforms = stdenv.lib.platforms.linux; + platforms = platforms.linux; + license = licenses.bsd3; }; } diff --git a/pkgs/os-specific/linux/procps-ng/default.nix b/pkgs/os-specific/linux/procps-ng/default.nix index 316f0ad1a28d..08420e36c65b 100644 --- a/pkgs/os-specific/linux/procps-ng/default.nix +++ b/pkgs/os-specific/linux/procps-ng/default.nix @@ -1,38 +1,17 @@ -{ lib, stdenv, fetchFromGitLab, fetchpatch, ncurses, libtool, gettext, autoconf, automake, pkgconfig }: +{ lib, stdenv, fetchurl, ncurses, pkgconfig }: stdenv.mkDerivation rec { name = "procps-${version}"; - version = "3.3.13"; + version = "3.3.14"; - src = fetchFromGitLab { - owner ="procps-ng"; - repo = "procps"; - rev = "v${version}"; - sha256 = "0r3h9adhqi5fi62lx65z839fww35lfh2isnknhkaw71xndjpzr0q"; + # The project's releases are on SF, but git repo on gitlab. + src = fetchurl { + url = "mirror://sourceforge/procps-ng/procps-ng-${version}.tar.xz"; + sha256 = "0v3j6rkzzscqds37i105cxx3q4dk04rsgpqfd5p7hzcvk59h5njy"; }; buildInputs = [ ncurses ]; - nativeBuildInputs = [ libtool gettext autoconf automake pkgconfig ]; - - # https://gitlab.com/procps-ng/procps/issues/88 - # Patches needed for musl and glibc 2.28 - patches = [ - (fetchpatch { - url = "https://gitlab.com/procps-ng/procps/uploads/f91ff094be1e4638aeffb67bdbb751ba/numa.h.diff"; - sha256 = "16r537d2wfrvbv6dg9vyfck8n31xa58903mnssw1s4kb5ap83yd5"; - extraPrefix = ""; - }) - (fetchpatch { - url = "https://gitlab.com/procps-ng/procps/uploads/6a7bdea4d82ba781451316fda74192ae/libio_detection.diff"; - sha256 = "0qp0j60kiycjsv213ih10imjirmxz8zja3rk9fq5lr5xf7k2lr3p"; - }) - ]; - - # autoreconfHook doesn't quite get, what procps-ng buildprocss does - # with po/Makefile.in.in and stuff. - preConfigure = '' - ./autogen.sh - ''; + nativeBuildInputs = [ pkgconfig ]; makeFlags = "usrbin_execdir=$(out)/bin"; diff --git a/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix b/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix index c89a8ff91479..720e3fbbc9fb 100644 --- a/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix +++ b/pkgs/os-specific/linux/systemd/cryptsetup-generator.nix @@ -2,7 +2,7 @@ stdenv.lib.overrideDerivation systemd (p: { version = p.version; - name = "systemd-cryptsetup-generator"; + name = "systemd-cryptsetup-generator-${p.version}"; nativeBuildInputs = p.nativeBuildInputs ++ [ cryptsetup ]; outputs = [ "out" ]; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index c1f139d42a64..307ba9f43fa1 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub, fetchpatch, pkgconfig, intltool, gperf, libcap, kmod , zlib, xz, pam, acl, cryptsetup, libuuid, m4, utillinux, libffi , glib, kbd, libxslt, coreutils, libgcrypt, libgpgerror, libidn2, libapparmor -, audit, lz4, bzip2, libmicrohttpd +, audit, lz4, bzip2, libmicrohttpd, pcre2 , linuxHeaders ? stdenv.cc.libc.linuxHeaders , iptables, gnu-efi , autoreconfHook, gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45 @@ -43,7 +43,7 @@ in stdenv.mkDerivation rec { buildInputs = [ linuxHeaders libcap kmod xz pam acl /* cryptsetup */ libuuid glib libgcrypt libgpgerror libidn2 - libmicrohttpd ] ++ + libmicrohttpd pcre2 ] ++ stdenv.lib.optional withKexectools kexectools ++ stdenv.lib.optional withLibseccomp libseccomp ++ [ libffi audit lz4 bzip2 libapparmor @@ -101,20 +101,10 @@ in stdenv.mkDerivation rec { mesonFlagsArray+=(-Ddbussystemservicedir=$out/share/dbus-1/system-services) mesonFlagsArray+=(-Dpamconfdir=$out/etc/pam.d) mesonFlagsArray+=(-Drootprefix=$out) - mesonFlagsArray+=(-Dlibdir=$lib/lib) mesonFlagsArray+=(-Drootlibdir=$lib/lib) - mesonFlagsArray+=(-Dmandir=$man/lib) - mesonFlagsArray+=(-Dincludedir=$dev/include) mesonFlagsArray+=(-Dpkgconfiglibdir=$dev/lib/pkgconfig) mesonFlagsArray+=(-Dpkgconfigdatadir=$dev/share/pkgconfig) - # FIXME: Why aren't includedir and libdir picked up from mesonFlags while other options are? - substituteInPlace meson.build \ - --replace "includedir = join_paths(prefixdir, get_option('includedir'))" \ - "includedir = '$dev/include'" \ - --replace "libdir = join_paths(prefixdir, get_option('libdir'))" \ - "libdir = '$lib/lib'" - export LC_ALL="en_US.UTF-8"; # FIXME: patch this in systemd properly (and send upstream). # already fixed in f00929ad622c978f8ad83590a15a765b4beecac9: (u)mount @@ -155,6 +145,14 @@ in stdenv.mkDerivation rec { --replace "SYSTEMD_CGROUP_AGENT_PATH" "_SYSTEMD_CGROUP_AGENT_PATH" ''; + patches = [ + # https://github.com/systemd/systemd/pull/8580 + (fetchpatch { + url = https://github.com/systemd/systemd/pull/8580.patch; + sha256 = "1yp07hlpgqq0h2y0qc3kasswzkycz6p8d56d695ck1qa2f5bdfgn"; + }) + ]; + hardeningDisable = [ "stackprotector" ]; NIX_CFLAGS_COMPILE = @@ -170,6 +168,8 @@ in stdenv.mkDerivation rec { "-USYSTEMD_BINARY_PATH" "-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\"" ]; + doCheck = false; # fails a bunch of tests + postInstall = '' # sysinit.target: Don't depend on # systemd-tmpfiles-setup.service. This interferes with NixOps's diff --git a/pkgs/os-specific/linux/tcp-wrappers/cdecls.patch b/pkgs/os-specific/linux/tcp-wrappers/cdecls.patch new file mode 100644 index 000000000000..eee640e8a824 --- /dev/null +++ b/pkgs/os-specific/linux/tcp-wrappers/cdecls.patch @@ -0,0 +1,31 @@ +__BEGIN_DECLS/__END_DECLS are BSD specific and not defined in musl +glibc and uclibc had sys/cdefs.h doing it. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: tcp_wrappers_7.6/tcpd.h +=================================================================== +--- tcp_wrappers_7.6.orig/tcpd.h ++++ tcp_wrappers_7.6/tcpd.h +@@ -11,7 +11,9 @@ + #include <netinet/in.h> + #include <stdio.h> + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* Structure to describe one communications endpoint. */ + +@@ -252,6 +254,8 @@ extern char *fix_strtok(); + extern char *my_strtok(); + #endif + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif diff --git a/pkgs/os-specific/linux/tcp-wrappers/default.nix b/pkgs/os-specific/linux/tcp-wrappers/default.nix index 7da4e39ca6c0..5df7bb827aad 100644 --- a/pkgs/os-specific/linux/tcp-wrappers/default.nix +++ b/pkgs/os-specific/linux/tcp-wrappers/default.nix @@ -20,11 +20,22 @@ in stdenv.mkDerivation rec { prePatch = '' tar -xaf $debian patches="$(cat debian/patches/series | sed 's,^,debian/patches/,') $patches" + + substituteInPlace Makefile --replace STRINGS STRINGDEFS + substituteInPlace debian/patches/13_shlib_weaksym --replace STRINGS STRINGDEFS + ''; + + # Fix __BEGIN_DECLS usage (even if it wasn't non-standard, this doesn't include sys/cdefs.h) + patches = [ ./cdecls.patch ]; + + postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace Makefile \ + --replace '-DNETGROUP' '-DUSE_GETDOMAIN' ''; buildInputs = [ libnsl ]; - makeFlags = [ "STRINGS=" "REAL_DAEMON_DIR=$(out)/bin" "linux" ]; + makeFlags = [ "REAL_DAEMON_DIR=$(out)/bin" "linux" "AR:=$(AR)" ]; installPhase = '' mkdir -p "$out/bin" diff --git a/pkgs/os-specific/linux/tcp-wrappers/tcp-wrappers-7.6-headers.patch b/pkgs/os-specific/linux/tcp-wrappers/tcp-wrappers-7.6-headers.patch new file mode 100644 index 000000000000..328a4a102618 --- /dev/null +++ b/pkgs/os-specific/linux/tcp-wrappers/tcp-wrappers-7.6-headers.patch @@ -0,0 +1,295 @@ +--- a/options.c ++++ b/options.c +@@ -34,6 +34,8 @@ + + /* System libraries. */ + ++#include <unistd.h> ++#include <stdlib.h> + #include <sys/types.h> + #include <sys/param.h> + #include <sys/socket.h> +--- a/safe_finger.c ++++ b/safe_finger.c +@@ -20,6 +20,11 @@ + + /* System libraries */ + ++#include <unistd.h> ++#include <fcntl.h> ++#include <stdlib.h> ++#include <sys/wait.h> ++#include <grp.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <signal.h> +@@ -27,7 +31,7 @@ + #include <ctype.h> + #include <pwd.h> + +-extern void exit(); ++int pipe_stdin(char **argv); + + /* Local stuff */ + +--- a/scaffold.c ++++ b/scaffold.c +@@ -10,6 +10,7 @@ + + /* System libraries. */ + ++#include <stdlib.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/socket.h> +@@ -27,7 +27,4 @@ + #endif + +-#ifndef INET6 +-extern char *malloc(); +-#endif + + /* Application-specific. */ +--- a/shell_cmd.c ++++ b/shell_cmd.c +@@ -14,6 +14,10 @@ + + /* System libraries. */ + ++#include <unistd.h> ++#include <stdlib.h> ++#include <fcntl.h> ++#include <sys/wait.h> + #include <sys/types.h> + #include <sys/param.h> + #include <signal.h> +@@ -25,8 +25,6 @@ + #include <syslog.h> + #include <string.h> + +-extern void exit(); +- + /* Local stuff. */ + + #include "tcpd.h" +--- a/tcpdchk.c ++++ b/tcpdchk.c +@@ -20,6 +20,8 @@ + + /* System libraries. */ + ++#include <unistd.h> ++#include <stdlib.h> + #include <sys/types.h> + #include <sys/stat.h> + #ifdef INET6 +@@ -35,10 +36,7 @@ + #include <netdb.h> + #include <string.h> + +-extern int errno; +-extern void exit(); +-extern int optind; +-extern char *optarg; ++int cidr_mask_addr(char *str); + + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ +--- a/clean_exit.c ++++ b/clean_exit.c +@@ -13,8 +13,8 @@ + #endif + + #include <stdio.h> +- +-extern void exit(); ++#include <unistd.h> ++#include <stdlib.h> + + #include "tcpd.h" + +--- a/hosts_access.c ++++ b/hosts_access.c +@@ -23,6 +23,7 @@ + + /* System libraries. */ + ++#include <stdlib.h> + #include <sys/types.h> + #ifdef INT32_T + typedef uint32_t u_int32_t; +@@ -43,8 +44,8 @@ + #include <netdb.h> + #endif + +-extern char *fgets(); +-extern int errno; ++static int match_pattern_ylo(const char *s, const char *pattern); ++int cidr_mask_addr(char *str); + + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ +--- a/inetcf.c ++++ b/inetcf.c +@@ -9,15 +9,14 @@ + static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23"; + #endif + ++#include <stdlib.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <stdio.h> + #include <errno.h> + #include <string.h> + +-extern int errno; +-extern void exit(); +- ++#include "scaffold.h" + #include "tcpd.h" + #include "inetcf.h" + +--- a/percent_x.c ++++ b/percent_x.c +@@ -16,12 +16,12 @@ + + /* System libraries. */ + ++#include <unistd.h> ++#include <stdlib.h> + #include <stdio.h> + #include <syslog.h> + #include <string.h> + +-extern void exit(); +- + /* Local stuff. */ + + #include "tcpd.h" +--- a/rfc931.c ++++ b/rfc931.c +@@ -15,6 +15,7 @@ + + /* System libraries. */ + ++#include <unistd.h> + #include <stdio.h> + #include <syslog.h> + #include <sys/types.h> +--- a/tcpd.c ++++ b/tcpd.c +@@ -16,6 +16,7 @@ + + /* System libraries. */ + ++#include <unistd.h> + #include <sys/types.h> + #include <sys/param.h> + #include <sys/stat.h> +@@ -39,6 +39,8 @@ + #include "patchlevel.h" + #include "tcpd.h" + ++void fix_options(struct request_info *request); ++ + int allow_severity = SEVERITY; /* run-time adjustable */ + int deny_severity = LOG_WARNING; /* ditto */ + +--- a/tcpdmatch.c ++++ b/tcpdmatch.c +@@ -19,6 +19,8 @@ + + /* System libraries. */ + ++#include <unistd.h> ++#include <stdlib.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/socket.h> +@@ -30,9 +32,6 @@ + #include <setjmp.h> + #include <string.h> + +-extern void exit(); +-extern int optind; +-extern char *optarg; + + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ +--- a/update.c ++++ b/update.c +@@ -19,6 +19,7 @@ + + /* System libraries */ + ++#include <unistd.h> + #include <stdio.h> + #include <syslog.h> + #include <string.h> +--- a/misc.c ++++ b/misc.c +@@ -14,11 +14,10 @@ + #include <arpa/inet.h> + #include <stdio.h> + #include <string.h> ++#include <stdlib.h> + + #include "tcpd.h" + +-extern char *fgets(); +- + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ + #endif +--- a/fix_options.c ++++ b/fix_options.c +@@ -32,6 +32,7 @@ + + /* fix_options - get rid of IP-level socket options */ + ++void + fix_options(request) + struct request_info *request; + { +@@ -38,11 +38,8 @@ + #ifdef IP_OPTIONS + unsigned char optbuf[BUFFER_SIZE / 3], *cp; + char lbuf[BUFFER_SIZE], *lp; +-#ifdef __GLIBC__ +- size_t optsize = sizeof(optbuf), ipproto; +-#else +- int optsize = sizeof(optbuf), ipproto; +-#endif ++ socklen_t optsize = sizeof(optbuf); ++ int ipproto; + struct protoent *ip; + int fd = request->fd; + unsigned int opt; +--- a/socket.c ++++ b/socket.c +@@ -95,11 +95,7 @@ + static struct sockaddr_in client; + static struct sockaddr_in server; + #endif +-#ifdef __GLIBC__ +- size_t len; +-#else +- int len; +-#endif ++ socklen_t len; + char buf[BUFSIZ]; + int fd = request->fd; + +@@ -430,11 +426,7 @@ + #else + struct sockaddr_in sin; + #endif +-#ifdef __GLIBC__ +- size_t size = sizeof(sin); +-#else +- int size = sizeof(sin); +-#endif ++ socklen_t size; + + /* + * Eat up the not-yet received datagram. Some systems insist on a diff --git a/pkgs/os-specific/linux/udisks/2-default.nix b/pkgs/os-specific/linux/udisks/2-default.nix index 1c8e429c9455..a057cb3c101e 100644 --- a/pkgs/os-specific/linux/udisks/2-default.nix +++ b/pkgs/os-specific/linux/udisks/2-default.nix @@ -48,6 +48,8 @@ stdenv.mkDerivation rec { "INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0" ]; + doCheck = false; # fails + meta = { homepage = http://www.freedesktop.org/wiki/Software/udisks; description = "A daemon and command-line utility for querying and manipulating storage devices"; diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix index 8c1d117bc8b8..1e9101b68afe 100644 --- a/pkgs/os-specific/linux/upower/default.nix +++ b/pkgs/os-specific/linux/upower/default.nix @@ -28,6 +28,8 @@ stdenv.mkDerivation rec { NIX_CFLAGS_LINK = "-lgcc_s"; + doCheck = false; # fails with "env: './linux/integration-test': No such file or directory" + installFlags = "historydir=$(TMPDIR)/foo"; meta = { diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 618ba42e7416..9ec6c22d32a5 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -4,15 +4,15 @@ let version = lib.concatStringsSep "." ([ majorVersion ] ++ lib.optional (patchVersion != "") patchVersion); - majorVersion = "2.31"; - patchVersion = "1"; + majorVersion = "2.32"; + patchVersion = ""; in stdenv.mkDerivation rec { name = "util-linux-${version}"; src = fetchurl { url = "mirror://kernel/linux/utils/util-linux/v${majorVersion}/${name}.tar.xz"; - sha256 = "04fzrnrr3pvqskvjn9f81y0knh0jvvqx4lmbz5pd4lfdm5pv2l8s"; + sha256 = "0d2758kjll5xqm5fpp3sww1h66aahx161sf2b60jxqv4qymrfwvc"; }; patches = [ diff --git a/pkgs/os-specific/linux/v4l-utils/default.nix b/pkgs/os-specific/linux/v4l-utils/default.nix index 84b31d4d516b..9bdb16cd1f16 100644 --- a/pkgs/os-specific/linux/v4l-utils/default.nix +++ b/pkgs/os-specific/linux/v4l-utils/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { name = "v4l-utils-${version}"; - version = "1.12.3"; + version = "1.14.2"; src = fetchurl { url = "http://linuxtv.org/downloads/v4l-utils/${name}.tar.bz2"; - sha256 = "0vpl3jl0x441y7b5cn7zhdsyi954hp9h2p30jhnr1zkx1rpxsiss"; + sha256 = "14h6d2p3n4jmxhd8i0p1m5dbwz5vnpb3z88xqd9ghg15n7265fg6"; }; outputs = [ "out" "dev" ]; |