2022-01-06 07:46:05 +03:00
|
|
|
{ linkFarmFromDrvs
|
|
|
|
, mkDummySrc
|
2022-02-17 08:07:10 +03:00
|
|
|
, runCommand
|
2022-01-06 07:46:05 +03:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
cmpDummySrc = name: path:
|
|
|
|
let
|
|
|
|
dummySrc = mkDummySrc {
|
2022-05-09 16:38:16 +03:00
|
|
|
src = path + "/input";
|
2022-01-06 07:46:05 +03:00
|
|
|
};
|
|
|
|
in
|
2022-02-17 08:07:10 +03:00
|
|
|
runCommand "compare-${name}" { } ''
|
2022-01-06 07:46:05 +03:00
|
|
|
diff -r ${path + /expected} ${dummySrc}
|
|
|
|
touch $out
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
linkFarmFromDrvs "cleanCargoToml" [
|
|
|
|
(cmpDummySrc "single" ./single)
|
|
|
|
(cmpDummySrc "single-alt" ./single-alt)
|
2022-01-08 04:36:31 +03:00
|
|
|
(cmpDummySrc "workspace" ./workspace)
|
2022-01-06 07:46:05 +03:00
|
|
|
]
|