From 4e199a91dc49659ea3ecd7f8e174d6ade2a1d717 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 15 Feb 2022 21:16:33 -0800 Subject: [PATCH 1/3] mesa.drivers: Convert hard links to symlinks Signed-off-by: Anders Kaseorg --- pkgs/development/libraries/mesa/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index b91e140345de..de996cf74f33 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -15,6 +15,7 @@ , enableOSMesa ? stdenv.isLinux , enableOpenCL ? stdenv.isLinux && stdenv.isx86_64 , libclc +, jdupes }: /** Packaging design: @@ -233,6 +234,9 @@ self = stdenv.mkDerivation { fi done + # NAR doesn't support hard links, so convert them to symlinks. + ${jdupes}/bin/jdupes -Hlr "$drivers" + # add RPATH so the drivers can find the moved libgallium and libdricore9 # moved here to avoid problems with stripping patchelfed files for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do From d5cd8efaca6d2a04a35696ddc2f38a7a374e54d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 28 Feb 2022 21:10:42 +0100 Subject: [PATCH 2/3] mesa.drivers: improve readability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Janne Heß --- pkgs/development/libraries/mesa/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index de996cf74f33..c17b5883e454 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -235,7 +235,7 @@ self = stdenv.mkDerivation { done # NAR doesn't support hard links, so convert them to symlinks. - ${jdupes}/bin/jdupes -Hlr "$drivers" + ${jdupes}/bin/jdupes --hard-links --link-soft --recurse "$drivers" # add RPATH so the drivers can find the moved libgallium and libdricore9 # moved here to avoid problems with stripping patchelfed files From f5f9b6af9d207974075ce3963a6f17739beb3726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 28 Feb 2022 21:25:21 +0100 Subject: [PATCH 3/3] mesa.drivers: nit, more info in a comment --- pkgs/development/libraries/mesa/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index c17b5883e454..a732fa92e0ea 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -234,7 +234,7 @@ self = stdenv.mkDerivation { fi done - # NAR doesn't support hard links, so convert them to symlinks. + # NAR doesn't support hard links, so convert them to symlinks to save space. ${jdupes}/bin/jdupes --hard-links --link-soft --recurse "$drivers" # add RPATH so the drivers can find the moved libgallium and libdricore9