2022-09-09 14:08:57 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform, alsa-lib, atk, cairo, dbus, gdk-pixbuf, glib, gtk3, pango, pkg-config, makeDesktopItem }:
|
2022-03-10 19:12:11 +00:00
|
|
|
|
2022-09-09 14:08:57 +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-03-04 12:14:45 +00:00
|
|
|
startupWMClass = "psst-gui";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
in
|
2022-03-10 19:12:11 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "psst";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "unstable-2024-04-01";
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jpochyla";
|
|
|
|
repo = pname;
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "37d8da11774c6eff3d1c2902ac883dace178e832";
|
|
|
|
hash = "sha256-BGIbf7jtrspFqURyy2AIYKSSkcirLgj0oUBq0CHl+2s=";
|
2022-03-10 19:12:11 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-01-25 14:12:00 +00:00
|
|
|
"cubeb-0.10.3" = "sha256-gV1KHOhq678E/Rj+u8jX9Fw+TepPwuZdV5y/D+Iby+o=";
|
2023-05-24 13:37:59 +00:00
|
|
|
"druid-0.8.3" = "sha256-hTB9PQf2TAhcLr64VjjQIr18mczwcNogDSRSN5dQULA=";
|
|
|
|
"druid-enums-0.1.0" = "sha256-KJvAgKxicx/g+4QRZq3iHt6MGVQbfOpyN+EhS6CyDZk=";
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
|
|
|
};
|
2022-03-10 19:12:11 +00:00
|
|
|
# specify the subdirectory of the binary crate to build from the workspace
|
|
|
|
buildAndTestSubdir = "psst-gui";
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
dbus
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
pango
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
patches = [
|
|
|
|
# Use a fixed build time, hard-code upstream URL instead of trying to read `.git`
|
|
|
|
./make-build-reproducible.patch
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postInstall = ''
|
2022-09-09 14:08:57 +00:00
|
|
|
install -Dm444 psst-gui/assets/logo_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png
|
2022-11-21 17:40:18 +00:00
|
|
|
install -Dm444 -t $out/share/applications ${desktopItem}/share/applications/*
|
2022-06-16 17:23:12 +00:00
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = ./update.sh;
|
|
|
|
};
|
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast and multi-platform Spotify client with native GUI";
|
|
|
|
homepage = "https://github.com/jpochyla/psst";
|
|
|
|
license = licenses.mit;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ vbrandl peterhoeg ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "psst-gui";
|
2022-03-10 19:12:11 +00:00
|
|
|
};
|
|
|
|
}
|