2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-08-21 13:32:41 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2021-12-06 16:07:01 +00:00
|
|
|
, glib
|
2022-08-21 13:32:41 +00:00
|
|
|
, gtk4
|
|
|
|
, appstream-glib
|
|
|
|
, desktop-file-utils
|
|
|
|
, libxml2
|
|
|
|
, wrapGAppsHook4
|
2021-12-06 16:07:01 +00:00
|
|
|
, openssl
|
2022-08-21 13:32:41 +00:00
|
|
|
, dbus
|
|
|
|
, libadwaita
|
2021-12-06 16:07:01 +00:00
|
|
|
, gst_all_1
|
2022-08-21 13:32:41 +00:00
|
|
|
, Foundation
|
|
|
|
, SystemConfiguration
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "netease-cloud-music-gtk";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "2.0.3";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gmg137";
|
2022-08-21 13:32:41 +00:00
|
|
|
repo = pname;
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = version;
|
2022-11-04 12:27:35 +00:00
|
|
|
hash = "sha256-A3mvf6TZ3+aiWA6rg9G5NMaDKvO0VQzwIM1t0MaTpTc=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"netease-cloud-music-api-1.0.2" = "sha256-7Yp2ZBg5wHnDPtdPLwZQnqcSlVuGCrXpV5M/dp/IaOE=";
|
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-08-21 13:32:41 +00:00
|
|
|
meson
|
|
|
|
ninja
|
2021-12-06 16:07:01 +00:00
|
|
|
pkg-config
|
2022-08-21 13:32:41 +00:00
|
|
|
glib # glib-compile-resources
|
|
|
|
gtk4 # gtk4-update-icon-cache
|
|
|
|
appstream-glib # appstream-util
|
|
|
|
desktop-file-utils # update-desktop-database
|
|
|
|
libxml2 # xmllint
|
|
|
|
wrapGAppsHook4
|
|
|
|
] ++ (with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
rust.cargo
|
|
|
|
rust.rustc
|
|
|
|
]);
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2022-08-21 13:32:41 +00:00
|
|
|
dbus
|
|
|
|
libadwaita
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ (with gst_all_1; [
|
|
|
|
gstreamer
|
|
|
|
gst-plugins-base
|
|
|
|
gst-plugins-good
|
|
|
|
gst-plugins-bad
|
|
|
|
gst-plugins-ugly
|
2022-08-21 13:32:41 +00:00
|
|
|
]) ++ lib.optionals stdenv.isDarwin [
|
|
|
|
Foundation
|
|
|
|
SystemConfiguration
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-08-21 13:32:41 +00:00
|
|
|
description = "A Rust + GTK based netease cloud music player";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/gmg137/netease-cloud-music-gtk";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ diffumist ];
|
2022-08-21 13:32:41 +00:00
|
|
|
mainProgram = "netease-cloud-music-gtk4";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
}
|