nixpkgs/pkgs/by-name/sh/shopware-cli/package.nix

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

53 lines
1.3 KiB
Nix
Raw Normal View History

2023-05-03 11:56:19 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, makeWrapper
2023-06-15 08:41:01 +00:00
, dart-sass
, git
2023-05-03 11:56:19 +00:00
}:
buildGoModule rec {
pname = "shopware-cli";
2024-04-26 21:19:23 +00:00
version = "0.4.40";
2023-05-03 11:56:19 +00:00
src = fetchFromGitHub {
repo = "shopware-cli";
owner = "FriendsOfShopware";
rev = version;
2024-04-26 21:19:23 +00:00
hash = "sha256-ZyLEv9yWBoDDliMcb8DBvq+7VXva50No9GX/xyIZCcM=";
2023-05-03 11:56:19 +00:00
};
nativeBuildInputs = [ installShellFiles makeWrapper ];
nativeCheckInputs = [ git dart-sass ];
2023-05-03 11:56:19 +00:00
2024-04-26 21:19:23 +00:00
vendorHash = "sha256-K6JcwZ7u/CYCY+Kpi3Ju6b5hZnyjs/fUTkRtZ9IEAS0=";
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 \
2023-06-15 08:41:01 +00:00
--prefix PATH : ${lib.makeBinPath [ dart-sass ]}
2023-05-03 11:56:19 +00:00
'';
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";
2023-05-03 11:56:19 +00:00
homepage = "https://github.com/FriendsOfShopware/shopware-cli";
changelog = "https://github.com/FriendsOfShopware/shopware-cli/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ shyim ];
};
}