diff options
| -rw-r--r-- | flake.nix | 38 | ||||
| -rw-r--r-- | garnix.yaml | 4 | ||||
| -rw-r--r-- | pkgs/default.nix | 6 |
3 files changed, 14 insertions, 34 deletions
@@ -30,7 +30,9 @@ "aarch64-darwin" ]; - forAllSystems = nixpkgs.lib.genAttrs systems; + inherit (nixpkgs) lib; + + forAllSystems = lib.genAttrs systems; nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; @@ -52,46 +54,24 @@ formatter = forEachSystem (p: p.pkgs.alejandra); - checks = let - ciSystems = [ - "x86_64-linux" - "aarch64-linux" - ]; - in - nixpkgs.lib.genAttrs ciSystems (sys: self.packages.${sys}); - packages = forEachSystem ( { pkgs, system, }: let - inherit (builtins) attrNames elem filter listToAttrs map readDir substring; - inherit (nixpkgs.lib) filterAttrs removeSuffix; - - # filter disabled pkgs - avail = - filter (p: substring 0 1 p != "_" && p != "default.nix") - (attrNames (readDir ./pkgs)); - - names = map (removeSuffix ".nix") avail; - p = let - derivs = listToAttrs (map (name: { - inherit name; - value = pkgs.${name}; - }) - names); + packages = import ./pkgs pkgs; in - filterAttrs (_: v: - elem system (v.meta.platforms or []) && !(v.meta.broken or false)) - derivs; + lib.filterAttrs (_: v: + builtins.elem system (v.meta.platforms or []) && !(v.meta.broken or false)) + packages; in p // {default = p.treefetch;} ); - lib = import ./lib nixpkgs.lib; + lib = import ./lib lib; - overlays.default = import ./pkgs; + overlays.default = final: _: import ./pkgs final; templates = let # string -> string -> {} diff --git a/garnix.yaml b/garnix.yaml index 92f2c79..3d882b1 100644 --- a/garnix.yaml +++ b/garnix.yaml @@ -1,5 +1,5 @@ builds: exclude: [] include: - - "checks.x86_64-linux.*" - - "checks.aarch64-linux.*" + - "packages.x86_64-linux.*" + - "packages.aarch64-linux.*" diff --git a/pkgs/default.nix b/pkgs/default.nix index db63d63..30241ee 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,12 +1,12 @@ -final: _: let - inherit (final) callPackage; +pkgs: let + inherit (pkgs) callPackage; in { # original packages cfspeedtest = callPackage ./cfspeedtest.nix {}; check-pr = callPackage ./check-pr.nix {}; huion = callPackage ./huion.nix {}; mommy = callPackage ./mommy.nix {}; - theseus = callPackage ./theseus.nix {inherit (final.nodePackages) pnpm;}; + theseus = callPackage ./theseus.nix {inherit (pkgs.nodePackages) pnpm;}; treefetch = callPackage ./treefetch.nix {}; swhkd = callPackage ./swhkd {}; vim-just = callPackage ./vim-just.nix {}; |
