diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2018-12-22 12:49:41 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2018-12-22 12:55:05 +0100 |
commit | 1b146a8c6f55b23981c3817d8346f95bb3a799fe (patch) | |
tree | 5db2259e12241199731aad3a890fc23717742eaf /pkgs/development/compilers/swift | |
parent | 0a2efa121d7b3a291baa04c0abcd8e7d1c7a419f (diff) |
treewide: remove paxutils from stdenv
More then one year ago we removed grsecurity kernels from nixpkgs: https://github.com/NixOS/nixpkgs/pull/25277 This removes now also paxutils from stdenv.
Diffstat (limited to 'pkgs/development/compilers/swift')
-rw-r--r-- | pkgs/development/compilers/swift/default.nix | 9 | ||||
-rw-r--r-- | pkgs/development/compilers/swift/patches/build-script-pax.patch | 33 |
2 files changed, 1 insertions, 41 deletions
diff --git a/pkgs/development/compilers/swift/default.nix b/pkgs/development/compilers/swift/default.nix index bbfa1be8f921e..02b100fe61305 100644 --- a/pkgs/development/compilers/swift/default.nix +++ b/pkgs/development/compilers/swift/default.nix @@ -27,7 +27,6 @@ , git , libgit2 , fetchFromGitHub -, paxctl , findutils , makeWrapper , gnumake @@ -150,7 +149,7 @@ stdenv.mkDerivation rec { findutils makeWrapper gnumake - ] ++ stdenv.lib.optional stdenv.needsPax paxctl; + ]; # TODO: Revisit what's propagated and how propagatedBuildInputs = [ @@ -218,9 +217,6 @@ stdenv.mkDerivation rec { substituteInPlace swift/utils/build-script-impl \ --replace '/usr/include/c++' "${clang.cc.gcc}/include/c++" patch -p1 -d swift -i ${./patches/glibc-arch-headers.patch} - '' + stdenv.lib.optionalString stdenv.needsPax '' - patch -p1 -d swift -i ${./patches/build-script-pax.patch} - '' + '' patch -p1 -d swift -i ${./patches/0001-build-presets-linux-don-t-require-using-Ninja.patch} patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch} patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch} @@ -266,9 +262,6 @@ stdenv.mkDerivation rec { tar xf $INSTALLABLE_PACKAGE -C $out --strip-components=3 $PREFIX find $out -type d -empty -delete - paxmark pmr $out/bin/swift - paxmark pmr $out/bin/* - # TODO: Use wrappers to get these on the PATH for swift tools, instead ln -s ${clang}/bin/* $out/bin/ ln -s ${targetPackages.stdenv.cc.bintools.bintools_bin}/bin/ar $out/bin/ar diff --git a/pkgs/development/compilers/swift/patches/build-script-pax.patch b/pkgs/development/compilers/swift/patches/build-script-pax.patch deleted file mode 100644 index 1f47bf8ee0452..0000000000000 --- a/pkgs/development/compilers/swift/patches/build-script-pax.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- swift/utils/build-script-impl 2017-01-23 12:47:20.401326309 -0600 -+++ swift-pax/utils/build-script-impl 2017-01-23 13:24:10.339366996 -0600 -@@ -1837,6 +1837,17 @@ function set_lldb_xcodebuild_options() { - fi - } - -+## XXX: Taken from nixpkgs /pkgs/stdenv/generic/setup.sh -+isELF() { -+ local fn="$1" -+ local fd -+ local magic -+ exec {fd}< "$fn" -+ read -n 4 -u $fd magic -+ exec {fd}<&- -+ if [[ "$magic" =~ ELF ]]; then return 0; else return 1; fi -+} -+ - # - # Configure and build each product - # -@@ -2735,6 +2746,12 @@ for host in "${ALL_HOSTS[@]}"; do - fi - - call "${CMAKE_BUILD[@]}" "${build_dir}" $(cmake_config_opt ${product}) -- "${BUILD_ARGS[@]}" ${build_targets[@]} -+ -+ while IFS= read -r -d $'\0' i; do -+ if ! isELF "$i"; then continue; fi -+ echo "setting pax flags on $i" -+ paxctl -czexm "$i" || true -+ done < <(find "${build_dir}" -executable -type f -wholename "*/bin/*" -print0) - fi - done - done |