diff options
| -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 \ |
