Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #47400 from obsidiansystems/paxctl-darwin-no-mass-rebuild

paxctl: Fix darwin and cross without mass-rebuild

authored by

John Ericson and committed by
GitHub
e59a2ef7 07cc937d

+16 -3
+13 -3
pkgs/os-specific/linux/paxctl/default.nix
··· 1 - { fetchurl, stdenv }: 1 + { fetchurl, stdenv, elf-header }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "paxctl-${version}"; ··· 9 9 sha256 = "0biw882fp1lmgs6kpxznp1v6758r7dg9x8iv5a06k0b82bcdsc53"; 10 10 }; 11 11 12 - preBuild = '' 12 + # TODO Always do first way next mass rebuild. 13 + buildInputs = stdenv.lib.optional 14 + (!stdenv.hostPlatform.isLinux || !stdenv.buildPlatform.isLinux) 15 + elf-header; 16 + 17 + # TODO Always do first way next mass rebuild. 18 + preBuild = if !stdenv.hostPlatform.isLinux || !stdenv.buildPlatform.isLinux then '' 19 + sed -i Makefile \ 20 + -e 's|--owner 0 --group 0||g' \ 21 + -e '/CC:=gcc/d' 22 + '' else '' 13 23 sed "s|--owner 0 --group 0||g" -i Makefile 14 24 ''; 15 25 ··· 24 34 description = "A tool for controlling PaX flags on a per binary basis"; 25 35 homepage = "https://pax.grsecurity.net"; 26 36 license = licenses.gpl2; 27 - platforms = platforms.linux; 37 + platforms = platforms.all; 28 38 maintainers = with maintainers; [ thoughtpolice ]; 29 39 }; 30 40 }
+3
pkgs/stdenv/cross/default.nix
··· 53 53 else buildPackages.gcc; 54 54 55 55 extraNativeBuildInputs = old.extraNativeBuildInputs 56 + ++ lib.optionals 57 + (hostPlatform.isLinux && !buildPlatform.isLinux) 58 + [ buildPackages.patchelf buildPackages.paxctl ] 56 59 ++ lib.optional 57 60 (let f = p: !p.isx86 || p.libc == "musl"; in f hostPlatform && !(f buildPlatform)) 58 61 buildPackages.updateAutotoolsGnuConfigScriptsHook