git-age/flake.nix

53 lines
1.2 KiB
Nix

{
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;
}
);
}