feat: nix flake

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2023-11-13 19:22:57 -06:00
parent 015f5c97c8
commit dd2bc75dac
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
2 changed files with 105 additions and 0 deletions

60
flake.lock 100644
View File

@ -0,0 +1,60 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1699923567,
"narHash": "sha256-oVMICs/4eZdIkbZvKs/JZe0SwrON/2d5veuwhBOrnmE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5d6c73222280b7f69109dfa5c9572f4b74c3453c",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

45
flake.nix 100644
View File

@ -0,0 +1,45 @@
{
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;
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;
}
);
}