diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-22 01:55:49 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-22 01:55:49 +0200 |
| commit | 613176666f3f414c2f0a4b3639aa47076aa824c5 (patch) | |
| tree | 9bb2ea43683f8b86db10b21b70056aba1182a3cd | |
| parent | c6bb88d0cb9f0c164bce4330a18627fc8887428a (diff) | |
| download | nixos-613176666f3f414c2f0a4b3639aa47076aa824c5.tar nixos-613176666f3f414c2f0a4b3639aa47076aa824c5.tar.gz nixos-613176666f3f414c2f0a4b3639aa47076aa824c5.tar.bz2 nixos-613176666f3f414c2f0a4b3639aa47076aa824c5.tar.xz nixos-613176666f3f414c2f0a4b3639aa47076aa824c5.zip | |
…
| -rw-r--r-- | hel.nix | 12 |
1 files changed, 10 insertions, 2 deletions
| @@ -58,8 +58,16 @@ | |||
| 58 | ''; | 58 | ''; |
| 59 | 59 | ||
| 60 | samsung-unified-linux-driver = pkgs.stdenv.lib.overrideDerivation pkgs.samsung-unified-linux-driver (oldAttrs: { | 60 | samsung-unified-linux-driver = pkgs.stdenv.lib.overrideDerivation pkgs.samsung-unified-linux-driver (oldAttrs: { |
| 61 | installPhase = '' | 61 | postInstall = '' |
| 62 | ${oldAttrs.installPhase} | 62 | my_patchelf() { |
| 63 | opts=(); while [[ "$1" != - ]]; do opts+=( "$1" ); shift; done; shift | ||
| 64 | for binary in "$@"; do | ||
| 65 | echo "Patching ELF file: $binary" | ||
| 66 | patchelf "''${opts[@]}" $binary | ||
| 67 | ldd $binary | grep "not found" && exit 1 | ||
| 68 | done; true | ||
| 69 | } | ||
| 70 | |||
| 63 | my_patchelf \ | 71 | my_patchelf \ |
| 64 | --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | 72 | --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ |
| 65 | --set-rpath ${pkgs.cups}/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib:${pkgs.stdenv.glibc}/lib \ | 73 | --set-rpath ${pkgs.cups}/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib:${pkgs.stdenv.glibc}/lib \ |
