Merge pull request #173093 from adisbladis/lib-flakes-nix-revert

Revert "lib: init flakes.nix"
main
sternenseemann 2 years ago committed by GitHub
commit e42d059727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/default.nix
  2. 22
      lib/flakes.nix
  3. 8
      lib/tests/flakes/subflakeTest/flake.nix
  4. 5
      lib/tests/flakes/subflakeTest/subflake/flake.nix
  5. 10
      lib/tests/misc.nix

@ -11,9 +11,6 @@ let
callLibs = file: import file { lib = self; }; callLibs = file: import file { lib = self; };
in { in {
# interacting with flakes
flakes = callLibs ./flakes.nix;
# often used, or depending on very little # often used, or depending on very little
trivial = callLibs ./trivial.nix; trivial = callLibs ./trivial.nix;
fixedPoints = callLibs ./fixed-points.nix; fixedPoints = callLibs ./fixed-points.nix;
@ -62,7 +59,6 @@ let
# linux kernel configuration # linux kernel configuration
kernel = callLibs ./kernel.nix; kernel = callLibs ./kernel.nix;
inherit (self.flakes) callLocklessFlake;
inherit (builtins) add addErrorContext attrNames concatLists inherit (builtins) add addErrorContext attrNames concatLists
deepSeq elem elemAt filter genericClosure genList getAttr deepSeq elem elemAt filter genericClosure genList getAttr
hasAttr head isAttrs isBool isInt isList isString length hasAttr head isAttrs isBool isInt isList isString length

@ -1,22 +0,0 @@
{ lib }:
rec {
/* imports a flake.nix without acknowledging its lock file, useful for
referencing subflakes from a parent flake. The second argument allows
specifying the inputs of this flake.
Example:
callLocklessFlake {
path = ./directoryContainingFlake;
inputs = { inherit nixpkgs; };
}
*/
callLocklessFlake = { path, inputs ? { } }:
let
self = { outPath = path; } //
((import (path + "/flake.nix")).outputs (inputs // { self = self; }));
in
self;
}

@ -1,8 +0,0 @@
{
outputs = { self, subflake, callLocklessFlake }: rec {
x = (callLocklessFlake {
path = subflake;
inputs = {};
}).subflakeOutput;
};
}

@ -1,5 +0,0 @@
{
outputs = { self }: {
subflakeOutput = 1;
};
}

@ -22,16 +22,6 @@ in
runTests { runTests {
# FLAKES
testCallLocklessFlake = {
expr = callLocklessFlake {
path = ./flakes/subflakeTest;
inputs = { subflake = ./flakes/subflakeTest/subflake; inherit callLocklessFlake; };
};
expected = { x = 1; outPath = ./flakes/subflakeTest; };
};
# TRIVIAL # TRIVIAL
testId = { testId = {

Loading…
Cancel
Save