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:
Artturin 2023-08-13 05:40:01 +03:00
parent af9458db2d
commit 5c6ae8863d
2 changed files with 9 additions and 6 deletions

View File

@ -47,12 +47,13 @@ qtModule {
doCheck = false; # fails 13 out of 13 tests (ctest)
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''
rm -rf "$(pwd)"
mkdir "$(pwd)"
# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.isLinux ''
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/libexec/*
'';
enableParallelBuilding = true;
meta = {
maintainers = with lib.maintainers; [ abbradar periklis ];
knownVulnerabilities = [

View File

@ -35,8 +35,10 @@ in stdenv.mkDerivation rec {
buildInputs = [ libelf freeglut libGLU libGL ]
++ lib.optional stdenv.isDarwin GLUT;
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.isLinux ''
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/*
'';
doCheck = true;
checkTarget = "-C tests run_tests";