nixpkgs/pkgs/applications/audio/psst/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
1.9 KiB
Nix
Raw Normal View History

2022-08-30 18:17:12 +00:00
{ lib, fetchFromGitHub, rustPlatform, alsa-lib, atk, cairo, dbus, gdk-pixbuf, glib, gtk3, pango, pkg-config, makeDesktopItem }:
2022-03-09 17:51:12 +00:00
2022-08-30 18:17:12 +00:00
let
desktopItem = makeDesktopItem {
name = "Psst";
exec = "psst-gui";
comment = "Fast and multi-platform Spotify client with native GUI";
desktopName = "Psst";
type = "Application";
categories = [ "Audio" "AudioVideo" ];
icon = "psst";
terminal = false;
2023-02-26 23:01:35 +00:00
startupWMClass = "psst-gui";
2022-08-30 18:17:12 +00:00
};
2022-08-30 18:17:12 +00:00
in
2022-03-09 17:51:12 +00:00
rustPlatform.buildRustPackage rec {
pname = "psst";
2023-05-13 21:27:05 +00:00
version = "unstable-2023-05-13";
2022-03-09 17:51:12 +00:00
src = fetchFromGitHub {
owner = "jpochyla";
repo = pname;
2023-05-13 21:27:05 +00:00
rev = "f94af14aa9fdd3d59cd92849fa7f076103b37a70";
hash = "sha256-Cmpdyec1xe7j10LDm+iCaKlBICHkmmbhKz2nDeOFOF8=";
2022-03-09 17:51:12 +00:00
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
2023-05-13 21:27:05 +00:00
"cubeb-0.10.3" = "sha256-3eHW+kIJydF6nF0EkB/vglOvksfol+xIKoqFsKg3omI=";
"druid-0.8.3" = "sha256-hTB9PQf2TAhcLr64VjjQIr18mczwcNogDSRSN5dQULA=";
"druid-enums-0.1.0" = "sha256-KJvAgKxicx/g+4QRZq3iHt6MGVQbfOpyN+EhS6CyDZk=";
};
};
2022-03-09 17:51:12 +00:00
# specify the subdirectory of the binary crate to build from the workspace
buildAndTestSubdir = "psst-gui";
nativeBuildInputs = [ pkg-config ];
2022-03-09 17:51:12 +00:00
buildInputs = [
alsa-lib
atk
cairo
dbus
gdk-pixbuf
glib
gtk3
pango
];
2023-05-13 21:27:05 +00:00
patches = [
# Use a fixed build time, hard-code upstream URL instead of trying to read `.git`
./make-build-reproducible.patch
];
postInstall = ''
2022-08-30 18:17:12 +00:00
install -Dm444 psst-gui/assets/logo_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png
install -Dm444 -t $out/share/applications ${desktopItem}/share/applications/*
'';
2023-05-13 21:25:26 +00:00
passthru = {
updateScript = ./update.sh;
};
2022-03-09 17:51:12 +00:00
meta = with lib; {
description = "Fast and multi-platform Spotify client with native GUI";
homepage = "https://github.com/jpochyla/psst";
license = licenses.mit;
maintainers = with maintainers; [ vbrandl peterhoeg ];
2022-03-09 17:51:12 +00:00
};
}