about summary refs log tree commit diff
path: root/pkgs/by-name/yj
diff options
context:
space:
mode:
authorGuanran Wang <guanran928@outlook.com>2024-01-25 02:46:57 +0800
committerGuanran Wang <guanran928@outlook.com>2024-01-25 02:46:57 +0800
commitc9a1fcde03a2e3811ba7c6ae36ba6c698b873518 (patch)
tree2bf64af8e7b9784e3637136dc08ab9fddcd4fd39 /pkgs/by-name/yj
parent0e148322b344eab7c8d52f6e59b0d95ba73fb62e (diff)
yj: add meta.mainProgram, move to by-name
Diffstat (limited to 'pkgs/by-name/yj')
-rw-r--r--pkgs/by-name/yj/yj/package.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/by-name/yj/yj/package.nix b/pkgs/by-name/yj/yj/package.nix
new file mode 100644
index 0000000000000..ae45976195836
--- /dev/null
+++ b/pkgs/by-name/yj/yj/package.nix
@@ -0,0 +1,25 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "yj";
+  version = "5.1.0";
+
+  src = fetchFromGitHub {
+    owner = "sclevine";
+    repo = "yj";
+    rev = "v${version}";
+    hash = "sha256-lsn5lxtix5W7po6nzvGcHmifbyhrtHgvaKYT7RPPCOg=";
+  };
+
+  vendorHash = "sha256-NeSOoL9wtFzq6ba8ghseB6D+Qq8Z5holQExcAUbtYrs=";
+
+  ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
+
+  meta = with lib; {
+    description = "Convert YAML <=> TOML <=> JSON <=> HCL";
+    license = licenses.asl20;
+    mainProgram = "yj";
+    maintainers = with maintainers; [ Profpatsch ];
+    homepage = "https://github.com/sclevine/yj";
+  };
+}