diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-22 02:43:30 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-06-22 02:43:30 +0200 |
| commit | 10f7e74df052385dfa8eca54dbbbfc20d5c0be64 (patch) | |
| tree | ab9a451db71f9549c67633afc3d5de1fe42da295 | |
| parent | 613176666f3f414c2f0a4b3639aa47076aa824c5 (diff) | |
| download | nixos-10f7e74df052385dfa8eca54dbbbfc20d5c0be64.tar nixos-10f7e74df052385dfa8eca54dbbbfc20d5c0be64.tar.gz nixos-10f7e74df052385dfa8eca54dbbbfc20d5c0be64.tar.bz2 nixos-10f7e74df052385dfa8eca54dbbbfc20d5c0be64.tar.xz nixos-10f7e74df052385dfa8eca54dbbbfc20d5c0be64.zip | |
…
| -rw-r--r-- | hel.nix | 17 |
1 files changed, 1 insertions, 16 deletions
| @@ -58,22 +58,7 @@ | |||
| 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 | postInstall = '' | 61 | buildInputs = with pkgs; [cups]; |
| 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 | |||
| 71 | my_patchelf \ | ||
| 72 | --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | ||
| 73 | --set-rpath ${pkgs.cups}/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib:${pkgs.stdenv.glibc}/lib \ | ||
| 74 | - ${if pkgs.stdenv.system == "x86_64-linux" then "x86_64" else "i386"}/{rastertosamsungspl,rastertosamsungsplc} | ||
| 75 | install -m755 ${if pkgs.stdenv.system == "x86_64-linux" then "x86_64" else "i386"}/{rastertosamsungspl,rastertosamsungsplc} $out/lib/cups/filter | ||
| 76 | ''; | ||
| 77 | }); | 62 | }); |
| 78 | }; | 63 | }; |
| 79 | 64 | ||
