mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
zram-generator: format with nixfmt, use --replace-fail instead of --replace
This commit is contained in:
parent
ff3f176cdd
commit
754f5fb90d
@ -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")'
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user