nixpkgs/pkgs/applications/audio/netease-cloud-music-gtk/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

85 lines
1.6 KiB
Nix
Raw Normal View History

2021-11-10 10:02:17 +00:00
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, cargo
, meson
, ninja
, pkg-config
2021-11-10 10:02:17 +00:00
, glib
, gtk4
, appstream-glib
, desktop-file-utils
, libxml2
, rustc
, wrapGAppsHook4
2021-11-10 10:02:17 +00:00
, openssl
, dbus
, libadwaita
2021-11-10 10:02:17 +00:00
, gst_all_1
, Foundation
, SystemConfiguration
2021-11-10 10:02:17 +00:00
}:
stdenv.mkDerivation rec {
2021-11-10 10:02:17 +00:00
pname = "netease-cloud-music-gtk";
version = "2.2.0";
2021-11-10 10:02:17 +00:00
src = fetchFromGitHub {
owner = "gmg137";
repo = pname;
2021-11-10 10:02:17 +00:00
rev = version;
hash = "sha256-9qUzRmm3WQEVjzhzHMT1vNw3r3ymWGlBWXnnPsYGSnk=";
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"netease-cloud-music-api-1.2.0" = "sha256-MR1yVPrNzhZC65mQen88t7NbLfRcoWvT6DMSLGCMeTY=";
};
2021-11-10 10:02:17 +00:00
};
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
2021-11-10 10:02:17 +00:00
nativeBuildInputs = [
meson
ninja
2021-11-10 10:02:17 +00:00
pkg-config
glib # glib-compile-resources
gtk4 # gtk4-update-icon-cache
appstream-glib # appstream-util
desktop-file-utils # update-desktop-database
libxml2 # xmllint
wrapGAppsHook4
rustPlatform.cargoSetupHook
cargo
rustc
];
2021-11-10 10:02:17 +00:00
buildInputs = [
openssl
dbus
libadwaita
2021-11-10 10:02:17 +00:00
] ++ (with gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
]) ++ lib.optionals stdenv.isDarwin [
Foundation
SystemConfiguration
];
2021-11-10 10:02:17 +00:00
meta = with lib; {
description = "A Rust + GTK based netease cloud music player";
2021-11-10 10:02:17 +00:00
homepage = "https://github.com/gmg137/netease-cloud-music-gtk";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ diffumist ];
mainProgram = "netease-cloud-music-gtk4";
platforms = platforms.linux;
2021-11-10 10:02:17 +00:00
};
}