Skip to content

Commit

Permalink
feat: add makes
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Oct 12, 2023
1 parent 6db0674 commit 2104a01
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/makes.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ inputs }:
let
l = inputs.nixpkgs.lib // builtins;
inherit (inputs) nixpkgs makes;
in
l.fix (
l.extends
(_: _: {
inherit inputs;
inherit (nixpkgs) system;
__nixpkgs__ = nixpkgs;
__nixpkgsSrc__ = nixpkgs.path;
})
(import (makes + /src/args/agnostic.nix) { inherit (nixpkgs) system; })
.__unfix__
)
17 changes: 17 additions & 0 deletions local/lock/flake.lock

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

3 changes: 3 additions & 0 deletions local/lock/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";

makes.url = "github:fluidattacks/makes";
makes.flake = false;
};
outputs = _: { };
}
4 changes: 4 additions & 0 deletions tests/_snapshots/makes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#pretty
{
makeScript = <function, args: {aliases?, entrypoint, globalState?, help?, name, persistState?, replace?, searchPaths?}>;
}
20 changes: 20 additions & 0 deletions tests/makes/expr.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ omnibus, lib }:
let
inherit (omnibus.__inputs__) nixpkgs makes;
makesLib =
(omnibus.pops.lib.addLoadExtender {
load = {
inputs = {
inputs = {
nixpkgs = nixpkgs.legacyPackages.x86_64-linux;
inherit makes;
};
};
};
}).layouts.default.makes;

inherit (makesLib) makeScript;
in
{
makeScript = makeScript;
}
1 change: 1 addition & 0 deletions tests/makes/format.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"pretty"

0 comments on commit 2104a01

Please sign in to comment.