From 8f33b8cc93006c97a8f6b7ede20214992ed31fa8 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sun, 6 Sep 2015 10:21:43 +0200 Subject: 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. --- pkgs/applications/science/math/mathematica/9.nix | 2 +- pkgs/applications/science/math/mathematica/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/applications/science/math/mathematica') diff --git a/pkgs/applications/science/math/mathematica/9.nix b/pkgs/applications/science/math/mathematica/9.nix index c9357d7352f0..3c7f758d91bc 100644 --- a/pkgs/applications/science/math/mathematica/9.nix +++ b/pkgs/applications/science/math/mathematica/9.nix @@ -86,7 +86,7 @@ stdenv.mkDerivation rec { preFixup = '' echo "=== PatchElfing away ===" - find $out/libexec/Mathematica/SystemFiles -type f -perm +100 | while read f; do + find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/') if [ -z "$type" ]; then : diff --git a/pkgs/applications/science/math/mathematica/default.nix b/pkgs/applications/science/math/mathematica/default.nix index 5fc704178836..39f2409a987c 100644 --- a/pkgs/applications/science/math/mathematica/default.nix +++ b/pkgs/applications/science/math/mathematica/default.nix @@ -96,7 +96,7 @@ stdenv.mkDerivation rec { preFixup = '' echo "=== PatchElfing away ===" - find $out/libexec/Mathematica/SystemFiles -type f -perm +100 | while read f; do + find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/') if [ -z "$type" ]; then : -- cgit 1.4.1