feat(nix/emptyDerivation) add emptyDerivation
The most trivial of all derivations. It is more useful than it looks. Can be used to bind nix expressions (e.g. test suites) to a derivation, so that `nix-build` does not crap itself. Change-Id: I61c24d8c129c9505733161207f3c30e820f5b15e Reviewed-on: https://cl.tvl.fyi/c/depot/+/665 Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
98a990c6a6
commit
cdfae7de48
5 changed files with 90 additions and 0 deletions
20
nix/emptyDerivation/default.nix
Normal file
20
nix/emptyDerivation/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ depot, pkgs, ... }:
|
||||
|
||||
let
|
||||
emptyDerivation = import ./emptyDerivation.nix {
|
||||
inherit pkgs;
|
||||
inherit (pkgs) stdenv;
|
||||
inherit (depot.nix) getBins;
|
||||
};
|
||||
|
||||
tests = import ./tests.nix {
|
||||
inherit emptyDerivation;
|
||||
inherit pkgs;
|
||||
inherit (depot.nix) writeExecline getBins;
|
||||
inherit (depot.nix.runTestsuite) runTestsuite it assertEq;
|
||||
};
|
||||
|
||||
in {
|
||||
__functor = _: emptyDerivation;
|
||||
inherit tests;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue