50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, makeWrapper
|
|
, dart-sass-embedded
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "shopware-cli";
|
|
version = "0.1.73";
|
|
src = fetchFromGitHub {
|
|
repo = "shopware-cli";
|
|
owner = "FriendsOfShopware";
|
|
rev = version;
|
|
hash = "sha256-yjWLWTM6ybrNUMTMHQ3oHXTEp8MGI/qH7Y+gft5RXY8=";
|
|
};
|
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
|
|
|
vendorHash = "sha256-eaD2vdiAmP2/cMtc1wN0qaMBRvrEckGBf0p5MI1T4gI=";
|
|
|
|
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 ];
|
|
};
|
|
}
|