summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hel.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/hel.nix b/hel.nix
index d1b39371..f024d829 100644
--- a/hel.nix
+++ b/hel.nix
@@ -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 \