Skip to content

Commit

Permalink
refactor: clarify the namespaces between makes and makesSrc
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Nov 6, 2023
1 parent 0688bed commit 5c3909e
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
self = srcPops;
};

inherit (src) lib;
inherit src;
inherit (src) lib ops errors;

templates = {
nixos = {
Expand Down
14 changes: 7 additions & 7 deletions local/lock/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions local/lock/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";

makes.url = "github:fluidattacks/makes";
makes.flake = false;
makesSrc.url = "github:fluidattacks/makes";
makesSrc.flake = false;

nur.url = "github:nix-community/NUR";

Expand Down Expand Up @@ -58,8 +58,8 @@
};

inputs = {
climod.url = "github:nixosbrasil/climod";
climod.flake = false;
climodSrc.url = "github:nixosbrasil/climod";
climodSrc.flake = false;
};
outputs = _: { };
}
8 changes: 4 additions & 4 deletions src/ops/makes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
let
l = nixpkgs.lib // builtins;
inherit
(root.errors.requiredInputs inputs "lib" [
(root.errors.requiredInputs inputs "omnibus.pops.self" [
"nixpkgs"
"makes"
"makesSrc"
])
nixpkgs
makes
makesSrc
;
in
l.fix (
Expand All @@ -22,6 +22,6 @@ l.fix (
__nixpkgs__ = nixpkgs;
__nixpkgsSrc__ = nixpkgs.path;
})
(import (makes + /src/args/agnostic.nix) { inherit (nixpkgs) system; })
(import (makesSrc + /src/args/agnostic.nix) { inherit (nixpkgs) system; })
.__unfix__
)
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pops/allData.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
loader = with haumea; [
(matchers.regex "^(.+)\\.(yaml|yml)$" (
_: _: path:
root.readYAML path
root.ops.readYAML path
))
];
};
Expand Down
8 changes: 4 additions & 4 deletions src/pops/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ in
{
inherit nixpkgs;
}
// lib.optionalAttrs (inputs ? climod) {
climod = nixpkgs.callPackage inputs.climod { pkgs = nixpkgs; };
// lib.optionalAttrs (inputs ? climodSrc) {
climod = nixpkgs.callPackage inputs.climodSrc { pkgs = nixpkgs; };
}
// lib.optionalAttrs (inputs ? makes) (
// lib.optionalAttrs (inputs ? makesSrc) (
makes
// {
inputs = {
makesLib = makes;
inherit makes;
};
}
);
Expand Down
4 changes: 2 additions & 2 deletions tests/makes/expr.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{ omnibus, lib }:
let
inherit (omnibus.flake.inputs) nixpkgs makes;
inherit (omnibus.flake.inputs) nixpkgs makesSrc;
omnibusLib =
(omnibus.pops.self.addLoadExtender {
load = {
inputs = {
inputs = {
nixpkgs = nixpkgs.legacyPackages.x86_64-linux;
inherit makes;
inherit makesSrc;
};
};
};
Expand Down

0 comments on commit 5c3909e

Please sign in to comment.