nixpkgs/pkgs/development/web/shopify-themekit/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

30 lines
716 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "shopify-themekit";
version = "1.3.1";
src = fetchFromGitHub {
owner = "Shopify";
repo = "themekit";
rev = "v${version}";
sha256 = "sha256-HtgA+R6THZ49WYtGlHS1EzekjuuGgPe657Y6ewraD4o=";
};
vendorHash = "sha256-8QpkYj0fQb4plzvk6yCrZho8rq9VBiLft/EO3cczciI=";
ldflags = [ "-s" "-w" ];
postInstall = ''
# Keep `theme` only
rm -f $out/bin/{cmd,tkrelease}
'';
meta = with lib; {
description = "A command line tool for shopify themes";
mainProgram = "theme";
homepage = "https://shopify.github.io/themekit/";
license = licenses.mit;
maintainers = with maintainers; [ _1000101 ];
};
}