flashrom: append -chromebook to pname and $out/bin-name when forChromebook==true

master
Adam Joseph 2 years ago
parent 9ff6fba57c
commit 1b9d35c10d

@ -10,12 +10,13 @@
# use google's out-of-tree flashrom which can manipulate the
# write-protection registers of the chromebooks' on-board flash
# chips
# chips and can also write to the embedded controller (EC) flash,
# which is a separate chip
, forChromebook ? false
}:
stdenv.mkDerivation {
pname = "flashrom";
pname = "flashrom${lib.optionalString forChromebook "-chromebook"}";
version = if !forChromebook then "1.2+wp" else "0.9.9+d2da98-google";
src =
@ -46,9 +47,13 @@ stdenv.mkDerivation {
makeFlags = if !forChromebook then [
"PREFIX=$(out)" "libinstall"
] else [
"PREFIX=$(out)" "install"
"PREFIX=$(out)"
];
postInstall = lib.optionalString forChromebook ''
mv $out/sbin/flashrom $out/sbin/flashrom-chromebook
'';
meta = with lib; {
homepage = "https://www.flashrom.org";
description = "Utility for reading, writing, erasing and verifying flash ROM chips";

Loading…
Cancel
Save