Skip to content

Commit

Permalink
fix: move overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Nov 9, 2023
1 parent 6731f12 commit 79e6874
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,33 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs";

outputs = inputs:
inputs.flake-utils.lib.eachDefaultSystem (system:
let
overlays.default = final: prev: {
nix2container = import ./. { system = final.system; pkgs = prev; };
};

pkgs = inputs.nixpkgs.legacyPackages.${system}.extend overlays.default;

examples = pkgs.callPackage ./examples { };
tests = pkgs.callPackage ./tests { inherit examples; };
inputs.flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import inputs.nixpkgs { inherit system; overlays = [ inputs.self.overlays.default ]; };

packages = {
inherit (pkgs.nix2container) nix2container-bin skopeo-nix2container;
inherit examples tests;
default = packages.nix2container-bin;
hello = pkgs.nix2container.buildImage {
name = "hello";
config = {
entrypoint = [ "${pkgs.hello}/bin/hello" ];
examples = pkgs.callPackage ./examples { };
tests = pkgs.callPackage ./tests { inherit examples; };

packages = {
inherit (pkgs.nix2container) nix2container-bin skopeo-nix2container;
inherit examples tests;
default = packages.nix2container-bin;
hello = pkgs.nix2container.buildImage {
name = "hello";
config = {
entrypoint = [ "${pkgs.hello}/bin/hello" ];
};
};
};
};
in
{
inherit packages;
inherit (pkgs) nix2container;
inherit overlays;
});
in
{
inherit packages;
inherit (pkgs) nix2container;
})
// {
overlays.default = final: prev: {
nix2container = import ./. { system = final.system; pkgs = prev; };
};
};
}

0 comments on commit 79e6874

Please sign in to comment.