about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-09-06 10:21:43 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-09-06 10:26:30 +0200
commit8f33b8cc93006c97a8f6b7ede20214992ed31fa8 (patch)
tree319163313cd55a160bbd9376151da1c96e124fd2 /pkgs/development/compilers
parentf67ddbaa6f049cdd2a5e2333e3679c4f5f4b638f (diff)
downloadnixlib-8f33b8cc93006c97a8f6b7ede20214992ed31fa8.tar
nixlib-8f33b8cc93006c97a8f6b7ede20214992ed31fa8.tar.gz
nixlib-8f33b8cc93006c97a8f6b7ede20214992ed31fa8.tar.bz2
nixlib-8f33b8cc93006c97a8f6b7ede20214992ed31fa8.tar.lz
nixlib-8f33b8cc93006c97a8f6b7ede20214992ed31fa8.tar.xz
nixlib-8f33b8cc93006c97a8f6b7ede20214992ed31fa8.tar.zst
nixlib-8f33b8cc93006c97a8f6b7ede20214992ed31fa8.zip
mass rewrite of find parameters to cross-platform style
Fixes #9044, close #9667. Thanks to @taku0 for suggesting this solution.
Now we have no modes starting with `/` or `+`.

Rewrite the `-perm` parameters of find:
 - completely safe: rewrite `/0100` and `+100` to `-0100`,
 - slightly semantics-changing: rewrite `+111` to `-0100`.
I cross-verified the `find` manual pages for Linux, Darwin, FreeBSD.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/ghc/6.10.2-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.0.4-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.4.2-binary.nix2
-rw-r--r--pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh2
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk-linux-base.nix2
5 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix
index 4e660853f200..96ec4e6c114a 100644
--- a/pkgs/development/compilers/ghc/6.10.2-binary.nix
+++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
     # On Linux, use patchelf to modify the executables so that they can
     # find editline/gmp.
     (if stdenv.isLinux then ''
-      find . -type f -perm +100 \
+      find . -type f -perm -0100 \
           -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
           --set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
       for prog in ld ar gcc strip ranlib; do
diff --git a/pkgs/development/compilers/ghc/7.0.4-binary.nix b/pkgs/development/compilers/ghc/7.0.4-binary.nix
index 7a6f1b78fa49..31df7f1fa355 100644
--- a/pkgs/development/compilers/ghc/7.0.4-binary.nix
+++ b/pkgs/development/compilers/ghc/7.0.4-binary.nix
@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
     # On Linux, use patchelf to modify the executables so that they can
     # find editline/gmp.
     stdenv.lib.optionalString stdenv.isLinux ''
-      find . -type f -perm +100 \
+      find . -type f -perm -0100 \
           -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
           --set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
       sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
diff --git a/pkgs/development/compilers/ghc/7.4.2-binary.nix b/pkgs/development/compilers/ghc/7.4.2-binary.nix
index 3d781e9d558f..03dd4dcd35bb 100644
--- a/pkgs/development/compilers/ghc/7.4.2-binary.nix
+++ b/pkgs/development/compilers/ghc/7.4.2-binary.nix
@@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
     stdenv.lib.optionalString stdenv.isLinux ''
       mkdir -p "$out/lib"
       ln -sv "${ncurses}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5"
-      find . -type f -perm +100 \
+      find . -type f -perm -0100 \
           -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
           --set-rpath "$out/lib:${gmp}/lib" {} \;
       sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
diff --git a/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh b/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh
index 56669ae0f2f6..459bfce50988 100644
--- a/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh
+++ b/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh
@@ -45,7 +45,7 @@ fi
 rpath=$rpath${rpath:+:}$jrePath/lib/$architecture/jli
 
 # set all the dynamic linkers
-find $out -type f -perm +100 \
+find $out -type f -perm -0100 \
     -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
     --set-rpath "$rpath" {} \;
 
diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
index 35ee1a04a268..c5588787922a 100644
--- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
@@ -142,7 +142,7 @@ let result = stdenv.mkDerivation rec {
     rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}
 
     # set all the dynamic linkers
-    find $out -type f -perm +100 \
+    find $out -type f -perm -0100 \
         -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
         --set-rpath "$rpath" {} \;