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