nixpkgs/pkgs/by-name/sp/spotify-tray/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

39 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, gtk3, makeWrapper }:
stdenv.mkDerivation rec {
pname = "spotify-tray";
version = "1.3.2";
src = fetchFromGitHub {
owner = "tsmetana";
repo = pname;
rev = "v${version}";
sha256 = "sha256-E86rA8cBjy/bI7sZHlT40o7i23PcONXT5GTHEfcaDf0=";
};
patches = [
(fetchpatch {
name = "fix-building-with-automake-1.16.5.patch";
url = "https://github.com/tsmetana/spotify-tray/commit/1305f473ba4a406e907b98c8255f23154f349613.patch";
sha256 = "sha256-u2IopfMzNCu2F06RZoJw3OAsRxxZYdIMnKnyb7/KBgk=";
})
];
nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper ];
buildInputs = [ gtk3 ];
postFixup = ''
wrapProgram $out/bin/spotify-tray --set GDK_BACKEND x11
'';
meta = with lib; {
homepage = "https://github.com/tsmetana/spotify-tray";
description = "Adds a tray icon to the Spotify Linux client application";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = [ ];
mainProgram = "spotify-tray";
};
}