Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / sp / spicetify-cli / package.nix
blobb393ff8723245a08dac4cf1c20492abb001e65c4
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   testers,
6   spicetify-cli,
7 }:
9 buildGoModule rec {
10   pname = "spicetify-cli";
11   version = "2.36.15";
13   src = fetchFromGitHub {
14     owner = "spicetify";
15     repo = "cli";
16     rev = "v${version}";
17     hash = "sha256-K3lhPeW6L9N9OljNn8e6iQqx4k4HX5A9mX7SUlv2IRw=";
18   };
20   vendorHash = "sha256-i3xnf440lslzeDJ4pLLONqw8ACbdkKgPIhlPSuC1Vng=";
22   ldflags = [
23     "-s -w"
24     "-X 'main.version=${version}'"
25   ];
27   # used at runtime, but not installed by default
28   postInstall = ''
29     mv $out/bin/cli $out/bin/spicetify
30     ln -s $out/bin/spicetify $out/bin/spicetify-cli
31     cp -r ${src}/jsHelper $out/bin/jsHelper
32     cp -r ${src}/CustomApps $out/bin/CustomApps
33     cp -r ${src}/Extensions $out/bin/Extensions
34     cp -r ${src}/Themes $out/bin/Themes
35   '';
37   doInstallCheck = true;
38   installCheckPhase = ''
39     $out/bin/spicetify --help > /dev/null
40   '';
42   passthru.tests.version = testers.testVersion { package = spicetify-cli; };
44   meta = with lib; {
45     description = "Command-line tool to customize Spotify client";
46     homepage = "https://github.com/spicetify/cli";
47     license = licenses.gpl3Plus;
48     maintainers = [ maintainers.mdarocha ];
49     mainProgram = "spicetify";
50   };