2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-08-21 13:32:41 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, cargo
|
2022-08-21 13:32:41 +00:00
|
|
|
, 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
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustc
|
2022-08-21 13:32:41 +00:00
|
|
|
, wrapGAppsHook4
|
2021-12-06 16:07:01 +00:00
|
|
|
, openssl
|
2022-08-21 13:32:41 +00:00
|
|
|
, dbus
|
|
|
|
, libadwaita
|
2024-02-29 20:09:43 +00:00
|
|
|
, glib-networking
|
2021-12-06 16:07:01 +00:00
|
|
|
, gst_all_1
|
|
|
|
}:
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "netease-cloud-music-gtk";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.3.1";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gmg137";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "netease-cloud-music-gtk";
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-75zovq7Q370L+bRczTCCC34G2w8xeMMUK5EUTfKAc+w=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-04-21 15:54:59 +00:00
|
|
|
"netease-cloud-music-api-1.3.1" = "sha256-ZIc5zj9ZtLBYlZqBR7iUW+KmD71M+OYDiv0dkZrpFos=";
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
cp ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
|
|
|
|
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
|
2023-05-24 13:37:59 +00:00
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
cargo
|
|
|
|
rustc
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2022-08-21 13:32:41 +00:00
|
|
|
dbus
|
|
|
|
libadwaita
|
2024-02-29 20:09:43 +00:00
|
|
|
glib-networking
|
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
|
2024-02-29 20:09:43 +00:00
|
|
|
]);
|
|
|
|
|
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;
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with maintainers; [ diffumist aleksana ];
|
2022-08-21 13:32:41 +00:00
|
|
|
mainProgram = "netease-cloud-music-gtk4";
|
2023-08-04 22:07:22 +00:00
|
|
|
platforms = platforms.linux;
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
}
|