Skip to content

Commit

Permalink
flake: Clean up overlay
Browse files Browse the repository at this point in the history
An internal overlay doesn't really need to be created and makes things a
lot more complicated conceptually. This commit should just simplify
things without changing the exposed outputs.
  • Loading branch information
cyntheticfox committed Sep 15, 2022
1 parent 1a40bbc commit cfb58e7
Showing 1 changed file with 18 additions and 23 deletions.
41 changes: 18 additions & 23 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,40 @@
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, flake-utils }:
let
internal_overlay = final: prev: {
napalm = import ./. {
pkgs = final;
};
};
in
flake-utils.lib.eachDefaultSystem
(
system:
(system:
let
pkgs = import nixpkgs { inherit system; overlays = [ internal_overlay ]; };
napalm = import ./. {
pkgs = nixpkgs.legacyPackages."${system}";
};
in
{
legacyPackages = {
inherit (pkgs.napalm)
inherit (napalm)
buildPackage
snapshotFromPackageLockJson
;
};

packages = {
inherit (pkgs.napalm)
hello-world hello-world-deps netlify-cli deckdeckgo-starter
bitwarden-cli napalm-registry
inherit (napalm)
hello-world
hello-world-deps
netlify-cli
deckdeckgo-starter
bitwarden-cli
napalm-registry
;
};

devShell = pkgs.napalm.napalm-registry-devshell;
devShell = napalm.napalm-registry-devshell;
}
) // {
overlay = final: prev: builtins.removeAttrs (internal_overlay final prev) [
"hello-world"
"hello-world-deps"
"netlify-cli"
"deckdeckgo-starter"
"bitwarden-cli"
"napalm-registry"
];
overlay = final: prev: {
napalm = import ./. {
pkgs = final;
};
};

defaultTemplate = {
path = ./template;
Expand Down

0 comments on commit cfb58e7

Please sign in to comment.