at master 61 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 buildGoModule, 5 fetchFromGitHub, 6 installShellFiles, 7 makeWrapper, 8 dart-sass, 9 git, 10}: 11 12buildGoModule rec { 13 pname = "shopware-cli"; 14 version = "0.6.22"; 15 src = fetchFromGitHub { 16 repo = "shopware-cli"; 17 owner = "FriendsOfShopware"; 18 tag = version; 19 hash = "sha256-u5hFjDLGBXVvAp4WYWBb3HCzGDjkg9jj251LaV1zA8I="; 20 }; 21 22 nativeBuildInputs = [ 23 installShellFiles 24 makeWrapper 25 ]; 26 nativeCheckInputs = [ 27 git 28 dart-sass 29 ]; 30 31 vendorHash = "sha256-Ckn6+DzHPX+UG5YxYqvkdaio/elRQssbDSR+zAfxzdE="; 32 33 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 34 installShellCompletion --cmd shopware-cli \ 35 --bash <($out/bin/shopware-cli completion bash) \ 36 --zsh <($out/bin/shopware-cli completion zsh) \ 37 --fish <($out/bin/shopware-cli completion fish) 38 ''; 39 40 preFixup = '' 41 wrapProgram $out/bin/shopware-cli \ 42 --prefix PATH : ${lib.makeBinPath [ dart-sass ]} 43 ''; 44 45 ldflags = [ 46 "-s" 47 "-w" 48 "-X 'github.com/FriendsOfShopware/shopware-cli/cmd.version=${version}'" 49 ]; 50 51 __darwinAllowLocalNetworking = true; 52 53 meta = { 54 description = "Command line tool for Shopware 6"; 55 mainProgram = "shopware-cli"; 56 homepage = "https://github.com/FriendsOfShopware/shopware-cli"; 57 changelog = "https://github.com/FriendsOfShopware/shopware-cli/releases/tag/${version}"; 58 license = lib.licenses.mit; 59 maintainers = with lib.maintainers; [ shyim ]; 60 }; 61}