Change:
Installing fails due to missing command : Install , e.g. via . App should build, install & run without errors.
Looks like was removed in as part of was this change intended?
Probably not. Let me see...
Oh, yes, it seemed to me that it was only intended as an internal function for autoPachelf inner loop. Obviously, with bash nothing is really "internal". I think that you should be able to use autoPachelf for the same goal. Let me have a second look at it.
Does not seem like is a nixpkgs thing. I guess that is why I missed such a use case when refactoring. You should not really be using that function. You should let autoPatchelf find the right things to do for you in the whole file tree. There are plenty of examples, sometimes quite involved, of the expected usage of autopatchelfhook in nixpkgs. Still willing to have a look if you point me to the sources of breitbandmessung.
is part of nixpkgs, but it also seems to be the only package in here that uses :
Oh, I see. Do you happen to know why one would want to patch only that file, and specifically not the others ?
I'm not entirely sure, but I just replaced with without any other changes, and it still seems to build (in an older nixpkgs version before that python rewrite). On the latest nixpkgs master, I can get the build working with: Now the GUI shows a curious error, though: which roughly translates to: I get the same error when I try to run from an older nixpkgs state that still has , though. So, it doesn't seem related to the patchelf change.
The runtime error is probably related to: Perhaps has some insight as to why this stopped working.
Yes, indeed. The error happens because for some reason the other files should not be modified, only that one. And that is not feasible with my rewrite. Please have a look at my patch in , to test if it works for you. I think it is a reasonable way forward without having to re-introduce autoPatchelfFile.

Discussion:
{ lib , stdenv <del> , alsa-lib , at-spi2-atk , at-spi2-core , atk , autoPatchelfHook , cairo , cups , dbus , dpkg , expat </del> , fetchurl <del> , gdk-pixbuf , glib , gtk3 , libdrm , libxkbcommon </del> <ins> , dpkg , electron_16 </ins> , makeWrapper <del> , mesa </del> , nixosTests <del> , nspr , nss , pango , pciutils , systemd </del> <ins> , nodePackages </ins> , undmg <del> , writeShellScriptBin , xorg </del> }: let

version = "3.1.0"; <del> # At first start, the program checks for supported operating systems by calling `lsb_release -a` # and only runs when it finds Debian/Ubuntu. So we present us as Debian an make it happy. fake-lsb-release = writeShellScriptBin "lsb_release" '' echo "Distributor ID: Debian" echo "Description:    Debian GNU/Linux 10 (buster)" echo "Release:        10" echo "Codename:       buster" ''; binPath = lib.makeBinPath [ fake-lsb-release ]; </del> systemArgs = rec { x86_64-linux = rec { src = fetchurl {

sha256 = "sha256-jSP+H9ej9Wd+swBZSy9uMi2ExSTZ191FGZhqaocTl7w="; }; <del> dontUnpack = true; </del> nativeBuildInputs = [ <del> autoPatchelfHook </del> dpkg makeWrapper <ins> nodePackages.asar </ins> ]; <del> buildInputs = runtimeDependencies; runtimeDependencies = [ alsa-lib at-spi2-atk at-spi2-core atk cairo cups dbus expat gdk-pixbuf glib gtk3 libdrm libxkbcommon mesa nspr nss pango pciutils systemd xorg.libX11 xorg.libXcomposite xorg.libXdamage xorg.libXext xorg.libXfixes xorg.libXrandr xorg.libxcb xorg.libxshmfence ]; </del> <ins> unpackPhase = "dpkg-deb -x $src ."; </ins> installPhase = '' <del> dpkg-deb -x $src $out </del> mkdir -p $out/bin <del> chmod -R g-w $out addAutoPatchelfSearchPath --no-recurse $out/opt/Breitbandmessung autoPatchelfFile $out/opt/Breitbandmessung/breitbandmessung makeWrapper $out/opt/Breitbandmessung/breitbandmessung $out/bin/breitbandmessung  --prefix PATH : ${binPath} mv $out/usr/share $out/share rmdir $out/usr </del> <ins> mv usr/share $out/share mkdir -p $out/share/breitbandmessung/resources asar e opt/Breitbandmessung/resources/app.asar $out/share/breitbandmessung/resources # At first start, the program checks for supported operating systems by using the `bizzby-lsb-release` # module and only runs when it finds Debian/Ubuntu. So we present us as Debian and make it happy. cat <<EOF > $out/share/breitbandmessung/resources/node_modules/bizzby-lsb-release/lib/lsb-release.js module.exports = function release() { return { distributorID: "Debian", description: "Debian GNU/Linux 10 (buster)", release: "10", codename: "buster" } } EOF makeWrapper ${electron_16}/bin/electron $out/bin/breitbandmessung  --add-flags $out/share/breitbandmessung/resources/build/electron.js </ins> # Fix the desktop link substituteInPlace $out/share/applications/breitbandmessung.desktop  --replace /opt/Breitbandmessung $out/bin ''; <del> dontAutoPatchelf = true; dontPatchELF = true; </del> }; x86_64-darwin = {