From cdfae7de48051b3230044f9bfb81b341608e85f4 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 28 Jun 2020 02:30:08 +0200 Subject: 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 --- nix/emptyDerivation/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 nix/emptyDerivation/default.nix (limited to 'nix/emptyDerivation/default.nix') diff --git a/nix/emptyDerivation/default.nix b/nix/emptyDerivation/default.nix new file mode 100644 index 000000000000..4165d4fd9ac1 --- /dev/null +++ b/nix/emptyDerivation/default.nix @@ -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; +} -- cgit 1.4.1