2022-09-09 14:08:57 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, testers, spicetify-cli }:
|
2020-11-12 09:05:59 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "spicetify-cli";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.27.1";
|
2020-11-12 09:05:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-07-14 12:49:19 +00:00
|
|
|
owner = "spicetify";
|
2023-07-15 17:15:38 +00:00
|
|
|
repo = "spicetify-cli";
|
2020-11-12 09:05:59 +00:00
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-Z+paJAuzUnCdCSx2UHg1HV14vDo3jWsyUrcbEnvqTm0=";
|
2020-11-12 09:05:59 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
vendorHash = "sha256-H2kSTsYiD9HResHes+7YxUyNcjtM0SLpDPUC0Y518VM=";
|
2020-11-12 09:05:59 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s -w"
|
|
|
|
"-X 'main.version=${version}'"
|
|
|
|
];
|
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
# used at runtime, but not installed by default
|
|
|
|
postInstall = ''
|
|
|
|
cp -r ${src}/jsHelper $out/bin/jsHelper
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/spicetify-cli --help > /dev/null
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = spicetify-cli;
|
|
|
|
command = "spicetify-cli -v";
|
|
|
|
};
|
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Command-line tool to customize Spotify client";
|
2022-07-14 12:49:19 +00:00
|
|
|
homepage = "https://github.com/spicetify/spicetify-cli/";
|
2020-11-12 09:05:59 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ jonringer mdarocha ];
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "spicetify-cli";
|
2020-11-12 09:05:59 +00:00
|
|
|
};
|
|
|
|
}
|