From 18312c381ecdaeb0f1da2b524bd51647339c70eb Mon Sep 17 00:00:00 2001 From: jolheiser Date: Sun, 20 Aug 2023 20:32:32 -0500 Subject: [PATCH] feat: kv Signed-off-by: jolheiser --- default.nix | 1 + pkgs/kv/default.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/kv/default.nix diff --git a/default.nix b/default.nix index e6f10f2..aa75767 100644 --- a/default.nix +++ b/default.nix @@ -15,6 +15,7 @@ git-age = pkgs.callPackage ./pkgs/git-age {}; gomodinit = pkgs.callPackage ./pkgs/gomodinit {}; imp = pkgs.callPackage ./pkgs/imp {}; + kv = pkgs.callPackage ./pkgs/kx {}; tmpl = pkgs.callPackage ./pkgs/tmpl {}; # Other projects diff --git a/pkgs/kv/default.nix b/pkgs/kv/default.nix new file mode 100644 index 0000000..fbe29d8 --- /dev/null +++ b/pkgs/kv/default.nix @@ -0,0 +1,33 @@ +{ + buildGoModule, + fetchFromGitea, + lib, + ... +}: +buildGoModule rec { + pname = "kv"; + version = "0.0.3"; + + src = fetchFromGitea { + domain = "git.jojodev.com"; + owner = "jolheiser"; + repo = "kv"; + rev = "v${version}"; + sha256 = "sha256-55He6BT9QgcJ20Ia7SQFMUmLkwDooD5ICCfLq7kk+FM="; + }; + + vendorSha256 = "sha256-COA/YSyJanoxvYG3LFmp9eCwVJuqI9PZV1fLOs4MSPo="; + + ldflags = ["-s" "-w" "-X=main.Version=${version}"]; + + postInstall = '' + mkdir -p $out/share + cp -vr ./contrib/kv-completions.nu $out/share/kv-completions.nu + ''; + + meta = with lib; { + description = "Key/Value store"; + homepage = "https://git.jojodev.com/jolheiser/kv"; + license = licenses.mit; + }; +}