mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-29 21:42:23 +03:00
22 lines
392 B
Nix
22 lines
392 B
Nix
|
{ linkFarmFromDrvs
|
||
|
, mkDummySrc
|
||
|
, runCommand
|
||
|
}:
|
||
|
|
||
|
let
|
||
|
cmpDummySrc = name: path:
|
||
|
let
|
||
|
dummySrc = mkDummySrc {
|
||
|
src = path + /input;
|
||
|
};
|
||
|
in
|
||
|
runCommand "compare-${name}" { } ''
|
||
|
diff -r ${path + /expected} ${dummySrc}
|
||
|
touch $out
|
||
|
'';
|
||
|
in
|
||
|
linkFarmFromDrvs "cleanCargoToml" [
|
||
|
(cmpDummySrc "single" ./single)
|
||
|
(cmpDummySrc "single-alt" ./single-alt)
|
||
|
]
|