uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
26
pkgs/build-support/testers/test-equal-derivation.nix
Normal file
26
pkgs/build-support/testers/test-equal-derivation.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, runCommand, emptyFile, nix-diff }:
|
||||
|
||||
assertion: a: b:
|
||||
let
|
||||
drvA = builtins.unsafeDiscardOutputDependency a.drvPath or (throw "testEqualDerivation second argument must be a package");
|
||||
drvB = builtins.unsafeDiscardOutputDependency b.drvPath or (throw "testEqualDerivation third argument must be a package");
|
||||
name =
|
||||
if a?name
|
||||
then "testEqualDerivation-${a.name}"
|
||||
else "testEqualDerivation";
|
||||
in
|
||||
if drvA == drvB then
|
||||
emptyFile
|
||||
else
|
||||
runCommand name
|
||||
{
|
||||
inherit assertion drvA drvB;
|
||||
nativeBuildInputs = [ nix-diff ];
|
||||
} ''
|
||||
echo "$assertion"
|
||||
echo "However, the derivations differ:"
|
||||
echo
|
||||
echo nix-diff $drvA $drvB
|
||||
nix-diff $drvA $drvB
|
||||
exit 1
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue