nixpkgs/pkgs/tools/misc/shopware-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.3 KiB
Nix
Raw Normal View History

2023-05-03 11:56:19 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, makeWrapper
, dart-sass-embedded
}:
buildGoModule rec {
pname = "shopware-cli";
2023-05-15 13:53:58 +00:00
version = "0.1.70";
2023-05-03 11:56:19 +00:00
src = fetchFromGitHub {
repo = "shopware-cli";
owner = "FriendsOfShopware";
rev = version;
2023-05-15 13:53:58 +00:00
hash = "sha256-lDEpPzoNc6oGqGXdpj3QratjV/JxUlce5R5tqUfgweE=";
2023-05-03 11:56:19 +00:00
};
nativeBuildInputs = [ installShellFiles makeWrapper ];
2023-05-15 13:53:58 +00:00
vendorSha256 = "sha256-uWXTT8iCPRRmsJhVDwtOvA4sR0Pm0n50nPq3i7ZRwbo=";
2023-05-03 11:56:19 +00:00
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-embedded ]}
'';
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 ];
};
}