diff --git a/lib/exporter/flakeOutputs.nix b/lib/exporter/flakeOutputs.nix index 7356348..a6fac8f 100644 --- a/lib/exporter/flakeOutputs.nix +++ b/lib/exporter/flakeOutputs.nix @@ -12,6 +12,8 @@ let in { inherit (outputs) srvos; + __inputs__ = super.pops.loadInputs.outputs; + dotfiles = inputs.self.outPath + "/dotfiles"; devshellModules = outputs.devshell.loadModules; diff --git a/lib/exporter/pops.nix b/lib/exporter/pops.nix index 2f6f17f..d316b59 100644 --- a/lib/exporter/pops.nix +++ b/lib/exporter/pops.nix @@ -11,6 +11,7 @@ in loadInputs = flops.flake.pops.default.setInitInputs ( inputs.self.outPath + "/local/lock" ); + loadData = flops.haumea.pops.default.setInit { loader = with haumea; [ matchers.json diff --git a/local/flake.lock b/local/flake.lock index 7815048..6d4b2c8 100755 --- a/local/flake.lock +++ b/local/flake.lock @@ -83,26 +83,6 @@ "type": "github" } }, - "darwin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1696360011, - "narHash": "sha256-HpPv27qMuPou4acXcZ8Klm7Zt0Elv9dgDvSJaomWb9Y=", - "owner": "LnL7", - "repo": "nix-darwin", - "rev": "8b6ea26d5d2e8359d06278364f41fbc4b903b28a", - "type": "github" - }, - "original": { - "owner": "LnL7", - "repo": "nix-darwin", - "type": "github" - } - }, "devshell": { "inputs": { "nixpkgs": "nixpkgs_2", @@ -706,7 +686,6 @@ "root": { "inputs": { "call-flake": "call-flake", - "darwin": "darwin", "haumea": [ "namaka", "haumea" diff --git a/local/flake.nix b/local/flake.nix index abcf42a..a2a49a1 100755 --- a/local/flake.nix +++ b/local/flake.nix @@ -3,8 +3,6 @@ inputs.std.follows = "std-ext/std"; inputs.nixpkgs.follows = "std-ext/nixpkgs"; - inputs.darwin.url = "github:LnL7/nix-darwin"; - inputs.darwin.inputs.nixpkgs.follows = "nixpkgs"; inputs.std-ext.url = "github:gtrunsec/std-ext"; inputs.std-ext.inputs.org-roam-book-template.follows = ""; @@ -39,18 +37,16 @@ eval = inputs.haumea.lib.load { src = ../tests; inputs = omnibus.inputs // { - omnibus = omnibus; + inherit omnibus inputs; lib = inputs.nixpkgs.lib // builtins; - inputs' = inputs; trace = true; }; }; checks = inputs.namaka.lib.load { src = ../tests; inputs = omnibus.inputs // { - omnibus = omnibus; + inherit omnibus inputs; lib = inputs.nixpkgs.lib // builtins; - inputs' = inputs; trace = false; }; }; diff --git a/local/lock/flake.lock b/local/lock/flake.lock index 4cd4e21..ef8ab20 100644 --- a/local/lock/flake.lock +++ b/local/lock/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1696360011, + "narHash": "sha256-HpPv27qMuPou4acXcZ8Klm7Zt0Elv9dgDvSJaomWb9Y=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "8b6ea26d5d2e8359d06278364f41fbc4b903b28a", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, "devshell": { "inputs": { "nixpkgs": [ @@ -64,11 +84,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1695145219, - "narHash": "sha256-Eoe9IHbvmo5wEDeJXKFOpKUwxYJIOxKUesounVccNYk=", + "lastModified": 1696879762, + "narHash": "sha256-Ud6bH4DMcYHUDKavNMxAhcIpDGgHMyL/yaDEAVSImQY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5ba549eafcf3e33405e5f66decd1a72356632b96", + "rev": "f99e5f03cc0aa231ab5950a15ed02afec45ed51a", "type": "github" }, "original": { @@ -80,6 +100,7 @@ }, "root": { "inputs": { + "darwin": "darwin", "devshell": "devshell", "fenix": "fenix", "home-manager": "home-manager", diff --git a/local/lock/flake.nix b/local/lock/flake.nix index c7e9323..4cd5b41 100644 --- a/local/lock/flake.nix +++ b/local/lock/flake.nix @@ -6,6 +6,9 @@ srvos.url = "github:numtide/srvos"; srvos.inputs.nixpkgs.follows = "nixpkgs"; + + darwin.url = "github:LnL7/nix-darwin"; + darwin.inputs.nixpkgs.follows = "nixpkgs"; }; inputs = { diff --git a/tests/data/expr.nix b/tests/data/expr.nix index 0342fa7..0271732 100644 --- a/tests/data/expr.nix +++ b/tests/data/expr.nix @@ -1,10 +1,11 @@ -{ omnibus, inputs' }: +{ omnibus }: let + inherit (omnibus.__inputs__) nixpkgs; loadDataAll = (omnibus.pops.lib.addLoadExtender { load = { inputs = { - inputs.nixpkgs = inputs'.nixpkgs.legacyPackages.x86_64-linux; + inputs.nixpkgs = nixpkgs.legacyPackages.x86_64-linux; }; }; }).layouts.default.loadDataAll; diff --git a/tests/flake-parts/expr.nix b/tests/flake-parts/expr.nix index 02b5fad..b47d858 100644 --- a/tests/flake-parts/expr.nix +++ b/tests/flake-parts/expr.nix @@ -3,11 +3,11 @@ POP, flops, lib, - inputs', + inputs, }: let system = "x86_64-linux"; - inputs = + inputs' = let loadInputs = omnibus.pops.loadInputs.setInitInputs ./__lock; in @@ -27,25 +27,25 @@ let (omnibus.pops.flake-parts.loadProfiles.addLoadExtender { load = { inputs = { - inherit (inputs) nixpkgs; + inherit (inputs') nixpkgs; inputs = { - inherit (inputs) chinookDb; + inherit (inputs') chinookDb; }; }; }; }).layouts.default.process-compose; mkFlake = - inputs.flake-parts.lib.mkFlake + inputs'.flake-parts.lib.mkFlake { - inputs = inputs // { + inputs = inputs' // { # fake self argument to make sure that the flake is - self = inputs'.self; + self = inputs.self; }; } { systems = [ system ]; - imports = [ inputs.process-compose-flake.flakeModule ]; + imports = [ inputs'.process-compose-flake.flakeModule ]; perSystem = { selfModule', ... }: { imports = [ flakePartsProfiles.sqlite-example ]; }; }; diff --git a/tests/nixos/__fixture/layouts.nix b/tests/nixos/__fixture/layouts.nix index 2310f9d..8ecdaa4 100644 --- a/tests/nixos/__fixture/layouts.nix +++ b/tests/nixos/__fixture/layouts.nix @@ -1,4 +1,5 @@ let + inherit (inputs) nixpkgs darwin; exporter = lib.mapAttrs (_: v: v.layouts) ( lib.removeAttrs super.pops [ "inputs" ] ); diff --git a/tests/nixos/_pops.nix b/tests/nixos/_pops.nix index fe438f0..d82ef74 100644 --- a/tests/nixos/_pops.nix +++ b/tests/nixos/_pops.nix @@ -1,15 +1,12 @@ -{ - omnibus, - root, - inputs', -}: +{ omnibus, root }: (omnibus.pops.exporter.addLoadExtender { load = { src = ./__fixture; inputs = { data = root.data; - nixpkgs = inputs'.nixpkgs; - darwin = inputs'.darwin; + inputs = { + inherit (omnibus.__inputs__) darwin nixpkgs; + }; }; }; })