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:
Profpatsch 2020-06-28 02:30:08 +02:00
parent 98a990c6a6
commit cdfae7de48
5 changed files with 90 additions and 0 deletions

View 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;
}