about summary refs log tree commit diff
path: root/pkgs/by-name/sh
diff options
context:
space:
mode:
authorSoner Sayakci <s.sayakci@shopware.com>2023-10-01 20:31:06 +0200
committerSoner Sayakci <s.sayakci@shopware.com>2023-10-01 20:49:52 +0200
commit15cace145e9bcc687379b493f51fcd5b75aaa73c (patch)
tree211f9c1a65ad40374d6f1102417395d1e9f92497 /pkgs/by-name/sh
parent58aa6737113478177ad861c2ff20e10bc8ce12af (diff)
shopware-cli: 0.2.8 -> 0.3.4
Diff: https://github.com/FriendsOfShopware/shopware-cli/compare/0.2.8...0.3.4

Changelog: https://github.com/FriendsOfShopware/shopware-cli/releases/tag/0.3.4
Diffstat (limited to 'pkgs/by-name/sh')
-rw-r--r--pkgs/by-name/sh/shopware-cli/package.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/by-name/sh/shopware-cli/package.nix b/pkgs/by-name/sh/shopware-cli/package.nix
new file mode 100644
index 0000000000000..adbe013805ea4
--- /dev/null
+++ b/pkgs/by-name/sh/shopware-cli/package.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, installShellFiles
+, makeWrapper
+, dart-sass
+, git
+}:
+
+buildGoModule rec {
+  pname = "shopware-cli";
+  version = "0.3.4";
+  src = fetchFromGitHub {
+    repo = "shopware-cli";
+    owner = "FriendsOfShopware";
+    rev = version;
+    hash = "sha256-1lOcr3XiQCh1T07iYRlGwMzsmQx1QYgkrStWlUM1XCo=";
+  };
+
+  nativeBuildInputs = [ installShellFiles makeWrapper ];
+  nativeCheckInputs = [ git dart-sass ];
+
+  vendorHash = "sha256-j133hlcfRKTkIcNdZQmGn5yiWfKHp/5UVwLAs1njNdM=";
+
+  postInstall = ''
+    export HOME="$(mktemp -d)"
+    installShellCompletion --cmd shopware-cli \
+      --bash <($out/bin/shopware-cli completion bash) \
+      --zsh <($out/bin/shopware-cli completion zsh) \
+      --fish <($out/bin/shopware-cli completion fish)
+  '';
+
+  preFixup = ''
+    wrapProgram $out/bin/shopware-cli \
+      --prefix PATH : ${lib.makeBinPath [ dart-sass ]}
+  '';
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X 'github.com/FriendsOfShopware/shopware-cli/cmd.version=${version}'"
+  ];
+
+  meta = with lib; {
+    description = "Command line tool for Shopware 6";
+    homepage = "https://github.com/FriendsOfShopware/shopware-cli";
+    changelog = "https://github.com/FriendsOfShopware/shopware-cli/releases/tag/${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ shyim ];
+  };
+}