2020-10-29 12:56:41 +00:00
|
|
|
{
|
|
|
|
description = "Convert go.mod/go.sum to Nix packages";
|
|
|
|
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
|
|
|
|
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
|
|
|
{
|
|
|
|
overlay = final: prev: {
|
|
|
|
buildGoApplication = final.callPackage ./builder { };
|
|
|
|
gomod2nix = final.callPackage ./default.nix { };
|
|
|
|
};
|
2021-03-16 23:08:52 +00:00
|
|
|
} //
|
|
|
|
(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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
})
|
|
|
|
);
|
2020-10-29 12:56:41 +00:00
|
|
|
}
|