nixpkgs/pkgs/applications/misc/spicetify-cli/default.nix
Lauren Yim 116e050d76
spicetify-cli: change sha256 to hash and don't use pname
https://github.com/NixOS/nixpkgs/pull/236215#discussion_r1222859377
From SuperSandro2000 on Matrix:
> People should generally not use `pname` wherever possible especially with `finalAttrs` where `pname` could be different.

Co-authored-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
2023-06-08 23:58:41 +10:00

43 lines
1.0 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, testers, spicetify-cli }:
buildGoModule rec {
pname = "spicetify-cli";
version = "2.20.0";
src = fetchFromGitHub {
owner = "spicetify";
repo = "spicetify-cli";
rev = "v${version}";
hash = "sha256-6pOFDQqzxA1eHI66BHL9Yst1PtGyJzhmFveCErBA2pU=";
};
vendorHash = "sha256-g0SuXDzYjg0mGzeDuB2tQnVnDmTiL5vw0r9QWSgIs3Q=";
ldflags = [
"-s -w"
"-X 'main.version=${version}'"
];
# 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
'';
passthru.tests.version = testers.testVersion {
package = spicetify-cli;
command = "spicetify-cli -v";
};
meta = with lib; {
description = "Command-line tool to customize Spotify client";
homepage = "https://github.com/spicetify/spicetify-cli/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jonringer ];
};
}