summary refs log blame commit diff
path: root/lib/flakes.nix
blob: 4dc027b6c9b3ed1a3551f0ec9c9c59d3f773b6f6 (plain) (tree)





















                                                                              
{ 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;

}