40 lines
875 B
Nix
40 lines
875 B
Nix
{
|
|
description = "go mod init";
|
|
|
|
inputs.nixpkgs.url = "github:nixos/nixpkgs";
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
}: let
|
|
system = "x86_64-linux";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in {
|
|
packages.${system}.default = pkgs.buildGoModule rec {
|
|
pname = "gomodinit";
|
|
version = "0.1.1";
|
|
src = ./.;
|
|
vendorHash = "sha256-7RMTRFHYgzQD7K5JDdjV7ABg6BpCZbQXS9gSRlm27X8=";
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=main.Version=${version}"
|
|
];
|
|
|
|
meta = with pkgs.lib; {
|
|
description = "go mod init";
|
|
homepage = "https://git.jojodev.com/jolheiser/gomodinit";
|
|
maintainers = with maintainers; [jolheiser];
|
|
mainProgram = "gomodinit";
|
|
};
|
|
};
|
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
nativeBuildInputs = with pkgs; [
|
|
go
|
|
gopls
|
|
];
|
|
};
|
|
};
|
|
}
|