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-08-21 13:32:41 +00:00
|
|
|
version = "2.0.1";
|
|
|
|
|
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-08-21 13:32:41 +00:00
|
|
|
hash = "sha256-dlJZvmfw9+cavAysxVzCekgPdygg5zbU3ZR5BOjPk08=";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./cargo-lock.patch ];
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src patches;
|
|
|
|
hash = "sha256-mJyjWEBsLhHwJCeZyRdby/K/jse0F9UBwfQxkNtZito=";
|
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
|
|
|
};
|
|
|
|
}
|