Home

gomodinit @6686d6491326ec79522d262ea150602d6bcb6c7a - refs - log -
-
https://git.jolheiser.com/gomodinit.git
go mod init
gomodinit / flake.nix
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
  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
      ];
    };
  };
}