diff --git a/pkgs/by-name/zr/zram-generator/package.nix b/pkgs/by-name/zr/zram-generator/package.nix index c8be4c66a330..d92690792bba 100644 --- a/pkgs/by-name/zr/zram-generator/package.nix +++ b/pkgs/by-name/zr/zram-generator/package.nix @@ -1,13 +1,14 @@ -{ lib -, stdenv -, fetchFromGitHub -, rustPlatform -, pkg-config -, bash -, ronn -, systemd -, kmod -, nixosTests +{ + lib, + stdenv, + fetchFromGitHub, + rustPlatform, + pkg-config, + bash, + ronn, + systemd, + kmod, + nixosTests, }: rustPlatform.buildRustPackage rec { @@ -28,10 +29,10 @@ rustPlatform.buildRustPackage rec { postPatch = '' cp ${./Cargo.lock} Cargo.lock substituteInPlace Makefile \ - --replace 'target/$(BUILDTYPE)' 'target/${stdenv.hostPlatform.rust.rustcTargetSpec}/$(BUILDTYPE)' + --replace-fail 'target/$(BUILDTYPE)' 'target/${stdenv.hostPlatform.rust.rustcTargetSpec}/$(BUILDTYPE)' substituteInPlace src/generator.rs \ - --replace 'Command::new("systemd-detect-virt")' 'Command::new("${systemd}/bin/systemd-detect-virt")' \ - --replace 'Command::new("modprobe")' 'Command::new("${kmod}/bin/modprobe")' + --replace-fail 'Command::new("systemd-detect-virt")' 'Command::new("${systemd}/bin/systemd-detect-virt")' \ + --replace-fail 'Command::new("modprobe")' 'Command::new("${kmod}/bin/modprobe")' substituteInPlace src/config.rs \ --replace-fail 'Command::new("/bin/sh")' 'Command::new("${bash}/bin/sh")' '';