about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-05-31 22:45:30 +0300
committerDoron Behar <doron.behar@gmail.com>2020-06-03 20:32:32 +0300
commitc59e8d3fb305aabe5c4a532f04a05ecb4b4d3bd2 (patch)
tree8c37f79604e799ef71d845a6b0bf9e21469969bf /pkgs/misc
parentb64205d164acb49cc85cb069fdbfbe1f1c3eacae (diff)
downloadnixlib-c59e8d3fb305aabe5c4a532f04a05ecb4b4d3bd2.tar
nixlib-c59e8d3fb305aabe5c4a532f04a05ecb4b4d3bd2.tar.gz
nixlib-c59e8d3fb305aabe5c4a532f04a05ecb4b4d3bd2.tar.bz2
nixlib-c59e8d3fb305aabe5c4a532f04a05ecb4b4d3bd2.tar.lz
nixlib-c59e8d3fb305aabe5c4a532f04a05ecb4b4d3bd2.tar.xz
nixlib-c59e8d3fb305aabe5c4a532f04a05ecb4b4d3bd2.tar.zst
nixlib-c59e8d3fb305aabe5c4a532f04a05ecb4b4d3bd2.zip
hplip: don't reference gcc in binaries from /share and other locations
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/drivers/hplip/3.18.5.nix5
-rw-r--r--pkgs/misc/drivers/hplip/default.nix10
2 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/misc/drivers/hplip/3.18.5.nix b/pkgs/misc/drivers/hplip/3.18.5.nix
index 80cd39b92334..f9064720fb64 100644
--- a/pkgs/misc/drivers/hplip/3.18.5.nix
+++ b/pkgs/misc/drivers/hplip/3.18.5.nix
@@ -199,6 +199,11 @@ python2Packages.buildPythonApplication {
     done
   '';
 
+  # There are some binaries there, which reference gcc-unwrapped otherwise.
+  stripDebugList = [
+    "share/hplip"
+  ];
+
   postFixup = ''
     substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out
     # Patch udev rules:
diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix
index b1853e28589c..7c9eb35b9af4 100644
--- a/pkgs/misc/drivers/hplip/default.nix
+++ b/pkgs/misc/drivers/hplip/default.nix
@@ -4,6 +4,8 @@
 , dbus, file, ghostscript, usbutils
 , net-snmp, openssl, perl, nettools
 , bash, coreutils, utillinux
+# To remove references to gcc-unwrapped
+, removeReferencesTo
 , withQt5 ? true
 , withPlugin ? false
 , withStaticPPDInstall ? false
@@ -65,7 +67,7 @@ python3Packages.buildPythonApplication {
     zlib
   ];
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig removeReferencesTo ];
 
   pythonPath = with python3Packages; [
     dbus
@@ -216,8 +218,14 @@ python3Packages.buildPythonApplication {
       --replace /usr/bin/nohup "" \
       --replace {,${utillinux}/bin/}logger \
       --replace {/usr,$out}/bin
+    remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/*.so)
   '';
 
+  # There are some binaries there, which reference gcc-unwrapped otherwise.
+  stripDebugList = [
+    "share/hplip" "lib/cups/backend" "lib/cups/filter" "lib/python3.7/site-packages" "lib/sane"
+  ];
+
   meta = with stdenv.lib; {
     description = "Print, scan and fax HP drivers for Linux";
     homepage = "https://developers.hp.com/hp-linux-imaging-and-printing";