mirror of
https://github.com/tweag/gomod2nix.git
synced 2024-11-09 20:19:08 +00:00
4a59ba5a69
This will make nixpkgs dumps (ie dumping gomod2nix into nixpkgs) easier going forward.
36 lines
869 B
Nix
36 lines
869 B
Nix
{
|
|
description = "Convert go.mod/go.sum to Nix packages";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
|
|
|
|
inputs.utils.url = "github:numtide/flake-utils";
|
|
|
|
outputs = { self, nixpkgs, utils }:
|
|
{
|
|
overlays.default = import ./overlay.nix;
|
|
|
|
templates = {
|
|
app = {
|
|
path = ./templates/app;
|
|
description = "Gomod2nix packaged application";
|
|
};
|
|
};
|
|
defaultTemplate = self.templates.app;
|
|
|
|
} //
|
|
(utils.lib.eachDefaultSystem
|
|
(system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
self.overlays.default
|
|
];
|
|
};
|
|
in
|
|
{
|
|
packages.default = pkgs.callPackage (pkgs.callPackage ./default.nix { }) { };
|
|
devShells.default = import ./shell.nix { inherit pkgs; };
|
|
})
|
|
);
|
|
}
|