summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradisbladis <adisbladis@gmail.com>2022-05-15 16:58:09 +1200
committeradisbladis <adisbladis@gmail.com>2022-05-15 22:39:46 +1200
commit161776ec1e35c565ff8543e7dac1f739115d1ec2 (patch)
tree6b4631454a0397051ee569cbd824eaad94782194
parentdf37224921959c95ecbdc7f6a728c84ab127c8a7 (diff)
Revert "lib: init flakes.nix"
This reverts commit PR #167947. Flakes aren't standardised and the `lib` namespace shouldn't be polluted with utilities that serve only experimental uses.
-rw-r--r--lib/default.nix4
-rw-r--r--lib/flakes.nix22
-rw-r--r--lib/tests/flakes/subflakeTest/flake.nix8
-rw-r--r--lib/tests/flakes/subflakeTest/subflake/flake.nix5
-rw-r--r--lib/tests/misc.nix10
5 files changed, 0 insertions, 49 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 22eb5440c282..e919509e724a 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -11,9 +11,6 @@ let
callLibs = file: import file { lib = self; };
in {
- # interacting with flakes
- flakes = callLibs ./flakes.nix;
-
# often used, or depending on very little
trivial = callLibs ./trivial.nix;
fixedPoints = callLibs ./fixed-points.nix;
@@ -62,7 +59,6 @@ let
# linux kernel configuration
kernel = callLibs ./kernel.nix;
- inherit (self.flakes) callLocklessFlake;
inherit (builtins) add addErrorContext attrNames concatLists
deepSeq elem elemAt filter genericClosure genList getAttr
hasAttr head isAttrs isBool isInt isList isString length
diff --git a/lib/flakes.nix b/lib/flakes.nix
deleted file mode 100644
index 4dc027b6c9b3..000000000000
--- a/lib/flakes.nix
+++ /dev/null
@@ -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;
-
-}
diff --git a/lib/tests/flakes/subflakeTest/flake.nix b/lib/tests/flakes/subflakeTest/flake.nix
deleted file mode 100644
index 3a8edd5e8c50..000000000000
--- a/lib/tests/flakes/subflakeTest/flake.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- outputs = { self, subflake, callLocklessFlake }: rec {
- x = (callLocklessFlake {
- path = subflake;
- inputs = {};
- }).subflakeOutput;
- };
-}
diff --git a/lib/tests/flakes/subflakeTest/subflake/flake.nix b/lib/tests/flakes/subflakeTest/subflake/flake.nix
deleted file mode 100644
index 41566b52090c..000000000000
--- a/lib/tests/flakes/subflakeTest/subflake/flake.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- outputs = { self }: {
- subflakeOutput = 1;
- };
-}
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix
index c7010f41394a..1154edf1de62 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -22,16 +22,6 @@ in
runTests {
-# FLAKES
-
- testCallLocklessFlake = {
- expr = callLocklessFlake {
- path = ./flakes/subflakeTest;
- inputs = { subflake = ./flakes/subflakeTest/subflake; inherit callLocklessFlake; };
- };
- expected = { x = 1; outPath = ./flakes/subflakeTest; };
- };
-
# TRIVIAL
testId = {