2020-10-29 12:56:41 +00:00
|
|
|
{
|
|
|
|
description = "Convert go.mod/go.sum to Nix packages";
|
|
|
|
|
2022-07-20 03:42:46 +00:00
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
|
2020-10-29 12:56:41 +00:00
|
|
|
|
|
|
|
inputs.utils.url = "github:numtide/flake-utils";
|
|
|
|
|
2021-03-16 23:08:52 +00:00
|
|
|
outputs = { self, nixpkgs, utils }:
|
2020-12-03 15:16:08 +00:00
|
|
|
{
|
2022-05-26 10:31:19 +00:00
|
|
|
overlays.default = import ./overlay.nix;
|
2022-05-30 11:09:22 +00:00
|
|
|
|
|
|
|
templates = {
|
|
|
|
app = {
|
|
|
|
path = ./templates/app;
|
|
|
|
description = "Gomod2nix packaged application";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
defaultTemplate = self.templates.app;
|
|
|
|
|
2021-03-16 23:08:52 +00:00
|
|
|
} //
|
|
|
|
(utils.lib.eachDefaultSystem
|
|
|
|
(system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
2022-05-26 10:31:19 +00:00
|
|
|
self.overlays.default
|
2021-03-16 23:08:52 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2022-08-23 14:44:58 +00:00
|
|
|
packages.default = pkgs.callPackage (pkgs.callPackage ./default.nix { }) { };
|
2022-05-26 10:31:19 +00:00
|
|
|
devShells.default = import ./shell.nix { inherit pkgs; };
|
2021-03-16 23:08:52 +00:00
|
|
|
})
|
|
|
|
);
|
2020-10-29 12:56:41 +00:00
|
|
|
}
|