diff options
Diffstat (limited to 'pkgs/development/tools/misc')
7 files changed, 28 insertions, 3 deletions
diff --git a/pkgs/development/tools/misc/automake/setup-hook.sh b/pkgs/development/tools/misc/automake/setup-hook.sh index 6f34f0d0ae17..5cd8c6229f68 100644 --- a/pkgs/development/tools/misc/automake/setup-hook.sh +++ b/pkgs/development/tools/misc/automake/setup-hook.sh @@ -2,4 +2,4 @@ addAclocals () { addToSearchPathWithCustomDelimiter : ACLOCAL_PATH $1/share/aclocal } -envHooks=(${envHooks[@]} addAclocals) +envHooks+=(addAclocals) diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix index 56f8cefe07ca..066087fcd13b 100644 --- a/pkgs/development/tools/misc/ccache/default.nix +++ b/pkgs/development/tools/misc/ccache/default.nix @@ -1,5 +1,7 @@ {stdenv, fetchurl, runCommand, gcc, zlib}: +assert stdenv.isLinux; + let ccache = stdenv.mkDerivation { diff --git a/pkgs/development/tools/misc/distcc/masq.nix b/pkgs/development/tools/misc/distcc/masq.nix index 753c35b5d3a2..28b31cbb48d5 100644 --- a/pkgs/development/tools/misc/distcc/masq.nix +++ b/pkgs/development/tools/misc/distcc/masq.nix @@ -3,6 +3,10 @@ stdenv.mkDerivation { name = "distcc-masq-${gccRaw.name}"; + meta = { + platforms = stdenv.lib.platforms.linux; + }; + phases = [ "installPhase" ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix index 06b5c2ef516d..5aa81e46bed1 100644 --- a/pkgs/development/tools/misc/patchelf/default.nix +++ b/pkgs/development/tools/misc/patchelf/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "c99f84d124347340c36707089ec8f70530abd56e7827c54d506eb4cc097a17e7"; }; + setupHook = [ ./setup-hook.sh ]; + meta = { homepage = http://nixos.org/patchelf.html; license = "GPL"; diff --git a/pkgs/development/tools/misc/patchelf/setup-hook.sh b/pkgs/development/tools/misc/patchelf/setup-hook.sh new file mode 100644 index 000000000000..b0d37b73e2b6 --- /dev/null +++ b/pkgs/development/tools/misc/patchelf/setup-hook.sh @@ -0,0 +1,16 @@ +# This setup hook calls patchelf to automatically remove unneeded +# directories from the RPATH of every library or executable in every +# output. + +fixupOutputHooks+=('if [ -z "$dontPatchELF" ]; then patchELF "$prefix"; fi') + +patchELF() { + header "patching ELF executables and libraries in $prefix" + if [ -e "$prefix" ]; then + find "$prefix" \( \ + \( -type f -a -name "*.so*" \) -o \ + \( -type f -a -perm +0100 \) \ + \) -print -exec patchelf --shrink-rpath '{}' \; + fi + stopNest +} diff --git a/pkgs/development/tools/misc/pkgconfig/setup-hook.sh b/pkgs/development/tools/misc/pkgconfig/setup-hook.sh index 77a69fb18781..1c153976a343 100644 --- a/pkgs/development/tools/misc/pkgconfig/setup-hook.sh +++ b/pkgs/development/tools/misc/pkgconfig/setup-hook.sh @@ -4,7 +4,7 @@ addPkgConfigPath () { } if test -n "$crossConfig"; then - crossEnvHooks=(${crossEnvHooks[@]} addPkgConfigPath) + crossEnvHooks+=(addPkgConfigPath) else - envHooks=(${envHooks[@]} addPkgConfigPath) + envHooks+=(addPkgConfigPath) fi diff --git a/pkgs/development/tools/misc/sloccount/default.nix b/pkgs/development/tools/misc/sloccount/default.nix index 1aa9a2c058d6..fffb80747482 100644 --- a/pkgs/development/tools/misc/sloccount/default.nix +++ b/pkgs/development/tools/misc/sloccount/default.nix @@ -31,6 +31,7 @@ stdenv.mkDerivation rec { configurePhase = '' sed -i "makefile" -"es|PREFIX[[:blank:]]*=.*$|PREFIX = $out|g" + sed -i "makefile" -"es|gcc|$CC|g" ''; doCheck = true; |