Files
nixpkgs/pkgs/by-name/sh/shopware-cli/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.4 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
makeWrapper,
dart-sass,
git,
}:
buildGoModule rec {
pname = "shopware-cli";
version = "0.6.22";
src = fetchFromGitHub {
repo = "shopware-cli";
owner = "FriendsOfShopware";
tag = version;
hash = "sha256-u5hFjDLGBXVvAp4WYWBb3HCzGDjkg9jj251LaV1zA8I=";
};
nativeBuildInputs = [
installShellFiles
makeWrapper
];
nativeCheckInputs = [
git
dart-sass
];
vendorHash = "sha256-Ckn6+DzHPX+UG5YxYqvkdaio/elRQssbDSR+zAfxzdE=";
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
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}'"
];
__darwinAllowLocalNetworking = true;
meta = {
description = "Command line tool for Shopware 6";
mainProgram = "shopware-cli";
homepage = "https://github.com/FriendsOfShopware/shopware-cli";
changelog = "https://github.com/FriendsOfShopware/shopware-cli/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ shyim ];
};
}