Unverified Commit 3af97fc9 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

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
parent 630052f3
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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";
+2 −2
Original line number Diff line number Diff line
@@ -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; {
+8 −2
Original line number Diff line number Diff line
@@ -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";
+9 −2
Original line number Diff line number Diff line
@@ -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/";
+8 −2
Original line number Diff line number Diff line
@@ -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";
Loading