Merge pull request #4 from GTrunSec/flake-overlay

Fix: flake overlay
This commit is contained in:
adisbladis 2021-03-17 02:07:49 +02:00 committed by GitHub
commit 5dffe7b6ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,18 +5,30 @@
inputs.utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
outputs = { self, nixpkgs, utils }:
{
overlay = final: prev: {
buildGoApplication = final.callPackage ./builder { };
gomod2nix = final.callPackage ./default.nix { };
};
} //
(utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
self.overlay
];
};
in
{
defaultPackage = pkgs.callPackage ./default.nix { };
});
devShell = with pkgs; mkShell {
buildInputs = [
gomod2nix
];
};
})
);
}