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
|
|
|
|
, desktop-file-utils
|
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-06-05 15:53:02 +00:00
|
|
|
version = "2.4.0";
|
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-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-uoC9J09U2aI1dhaKc3TxIyFwRrPRxDrzaV+RyoZ6mKo=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-06-05 15:53:02 +00:00
|
|
|
"netease-cloud-music-api-1.3.2" = "sha256-QRz9Sdu+0I7SwujoTBKWPQMjPDdX8ZyVlFwMw9pM7UY=";
|
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
|
|
|
desktop-file-utils # update-desktop-database
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|