cad8bbe589
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.
22 lines
529 B
Nix
22 lines
529 B
Nix
{ 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;
|
|
|
|
}
|