summary refs log tree commit diff
path: root/lib/default.nix
diff options
context:
space:
mode:
authormatthewcroughan <matt@croughan.sh>2022-04-12 18:55:41 +0100
committermatthewcroughan <matt@croughan.sh>2022-04-12 19:28:23 +0100
commitcad8bbe58905a14651a469be78f89cad55ee7c15 (patch)
treedff431f626519b9096a43ad6806b8e35e321b8ec /lib/default.nix
parentc190b08bb7793004a4706e008a7d0f9b2be3df70 (diff)
downloadnixpkgs-cad8bbe58905a14651a469be78f89cad55ee7c15.tar
nixpkgs-cad8bbe58905a14651a469be78f89cad55ee7c15.tar.gz
nixpkgs-cad8bbe58905a14651a469be78f89cad55ee7c15.tar.bz2
nixpkgs-cad8bbe58905a14651a469be78f89cad55ee7c15.tar.lz
nixpkgs-cad8bbe58905a14651a469be78f89cad55ee7c15.tar.xz
nixpkgs-cad8bbe58905a14651a469be78f89cad55ee7c15.tar.zst
nixpkgs-cad8bbe58905a14651a469be78f89cad55ee7c15.zip
lib: init flakes.nix
This commit creates flakes.nix, which is a library containing functions
which relate to interacting with flakes. It also moves related functions
from trivial.nix into it.
Diffstat (limited to 'lib/default.nix')
-rw-r--r--lib/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 7d20acc6794..8d7cc20ae48 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -11,6 +11,9 @@ 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;
@@ -59,12 +62,13 @@ 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
       lessThan listToAttrs pathExists readFile replaceStrings seq
       stringLength sub substring tail trace;
-    inherit (self.trivial) id callLocklessFlake const pipe concat or and bitAnd bitOr bitXor
+    inherit (self.trivial) id const pipe concat or and bitAnd bitOr bitXor
       bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max
       importJSON importTOML warn warnIf warnIfNot throwIf throwIfNot checkListOfEnum
       info showWarnings nixpkgsVersion version isInOldestRelease