treewide: amend hacks of removing $(pwd)

The strip phase is using $TMPDIR now, so it would fail with:
 mktemp: failed to create file via template 'striperr.XXXXXX': No such file or directory
This commit is contained in:
Vladimír Čunát 2023-08-05 09:23:43 +02:00
parent 630052f3e6
commit 3af97fc9ee
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
6 changed files with 39 additions and 12 deletions

View file

@ -45,8 +45,14 @@ stdenv.mkDerivation rec {
checkTarget = "test";
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" '';
# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.isLinux ''
for f in "$out"/bin/*; do
if isELF "$f"; then
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
fi
done
'';
meta = {
description = "Efficient Scheme compiler";

View file

@ -14,9 +14,9 @@ mkDerivation rec {
propagatedBuildInputs = [ glib libaccounts-glib ];
nativeBuildInputs = [ doxygen pkg-config qmake ];
# remove forbidden reference to $TMPDIR
# remove forbidden references to $TMPDIR
preFixup = ''
patchelf --shrink-rpath --allowed-rpath-prefixes "/nix/store" "$out"/bin/*
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/*
'';
meta = with lib; {

View file

@ -13,8 +13,14 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" '';
# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.isLinux ''
for f in "$out"/bin/*; do
if isELF "$f"; then
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
fi
done
'';
meta = {
description = "Library reading dwg files";

View file

@ -20,8 +20,6 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ libusb-compat-0_1 ];
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" '';
configureFlags = lib.optional (!stdenv.isDarwin) "--with-async-mode";
# allow async mode. from ubuntu. see:
@ -31,6 +29,15 @@ stdenv.mkDerivation rec {
--replace "ifdef USB_CLASS_PTP" "if 0"
'';
# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.isLinux ''
for f in "$out"/bin/*; do
if isELF "$f"; then
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
fi
done
'';
meta = {
description = "A library to talk to FTDI chips using libusb";
homepage = "https://www.intra2net.com/en/developer/libftdi/";

View file

@ -39,8 +39,14 @@ stdenv.mkDerivation rec {
--replace "/usr/bin/file" "${file}/bin/file"
'';
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" '';
# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.isLinux ''
for f in "$out"/bin/*; do
if isELF "$f"; then
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
fi
done
'';
meta = with lib; {
description = "Free touch typing tutor program";

View file

@ -13,8 +13,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" '';
# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.isLinux ''
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/*
'';
meta = {
description = "A program for calculating fuzzy hashes";