biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / by-name / sh / shopware-cli / package.nix
blobe37237ea289b71a7927221e25ff8fd52258334c5
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , installShellFiles
5 , makeWrapper
6 , dart-sass
7 , git
8 }:
10 buildGoModule rec {
11   pname = "shopware-cli";
12   version = "0.4.36";
13   src = fetchFromGitHub {
14     repo = "shopware-cli";
15     owner = "FriendsOfShopware";
16     rev = version;
17     hash = "sha256-14Za64G/UpFa6Dfyx7EAQqXMmCWyl5MIQEdutqMQrxE=";
18   };
20   nativeBuildInputs = [ installShellFiles makeWrapper ];
21   nativeCheckInputs = [ git dart-sass ];
23   vendorHash = "sha256-Zl84hA2YPG4p3t0V8ZPnLYGz4ggoTSln/koC40nbNZ4=";
25   postInstall = ''
26     export HOME="$(mktemp -d)"
27     installShellCompletion --cmd shopware-cli \
28       --bash <($out/bin/shopware-cli completion bash) \
29       --zsh <($out/bin/shopware-cli completion zsh) \
30       --fish <($out/bin/shopware-cli completion fish)
31   '';
33   preFixup = ''
34     wrapProgram $out/bin/shopware-cli \
35       --prefix PATH : ${lib.makeBinPath [ dart-sass ]}
36   '';
38   ldflags = [
39     "-s"
40     "-w"
41     "-X 'github.com/FriendsOfShopware/shopware-cli/cmd.version=${version}'"
42   ];
44   meta = with lib; {
45     description = "Command line tool for Shopware 6";
46     mainProgram = "shopware-cli";
47     homepage = "https://github.com/FriendsOfShopware/shopware-cli";
48     changelog = "https://github.com/FriendsOfShopware/shopware-cli/releases/tag/${version}";
49     license = licenses.mit;
50     maintainers = with maintainers; [ shyim ];
51   };