Home

git-age @main - refs - log -
-
https://git.jolheiser.com/git-age.git
git-crypt, but with age
git-age / 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
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  description = "git-age";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = {
    self,
    flake-utils,
    nixpkgs,
  }:
    flake-utils.lib.eachDefaultSystem (
      system: let
        pkgs = nixpkgs.legacyPackages.${system};
        git-age = pkgs.buildGoModule rec {
          pname = "git-age";
          version = "0.0.3";

          src = ./.;

          vendorHash = "sha256-W+WDMGyKQaHSsPLg1sVsHCmu087Cu0y7hq0f4uaVDqA=";

          ldflags = [
            "-s"
            "-w"
            "-X=go.jolheiser.com/git-age/cmd.version=${version}"
          ];

          doCheck = false;

          nativeBuildInputs = [pkgs.installShellFiles];

          preInstall = ''
            go run man.go
            installManPage git-age.1
          '';

          meta = with pkgs.lib; {
            description = "";
            homepage = "https://git.jojodev.com/jolheiser/git-age";
            license = licenses.mpl20;
            maintainers = with maintainers; [jolheiser];
            mainProgram = "git-age";
          };
        };
      in {
        packages.default = git-age;
      }
    );
}