mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, makeWrapper
|
|
, dart-sass
|
|
, git
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "shopware-cli";
|
|
version = "0.4.34";
|
|
src = fetchFromGitHub {
|
|
repo = "shopware-cli";
|
|
owner = "FriendsOfShopware";
|
|
rev = version;
|
|
hash = "sha256-hPEaTfOxijyf0pzgMBKmljB41A0G2aena50pBZerV0s=";
|
|
};
|
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
|
nativeCheckInputs = [ git dart-sass ];
|
|
|
|
vendorHash = "sha256-BODiybzXw4gJk99SzzDVvYsV555rW5ehhn+m/pre/pA=";
|
|
|
|
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 ]}
|
|
'';
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X 'github.com/FriendsOfShopware/shopware-cli/cmd.version=${version}'"
|
|
];
|
|
|
|
meta = with lib; {
|
|
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 = licenses.mit;
|
|
maintainers = with maintainers; [ shyim ];
|
|
};
|
|
}
|