Merge pull request #185504 from NickCao/netease

netease-cloud-music-gtk: 1.2.2 -> 2.0.1
This commit is contained in:
Bobby Rong 2022-08-16 18:51:22 +08:00 committed by GitHub
commit e1aa07fd38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 969 additions and 805 deletions

View File

@ -1,60 +1,78 @@
{ lib
, stdenv
, glib
, gtk3
, curl
, dbus
, openssl
, gst_all_1
, pkg-config
, rustPlatform
, wrapGAppsHook
, fetchurl
, fetchFromGitHub
, rustPlatform
, meson
, ninja
, pkg-config
, glib
, gtk4
, appstream-glib
, desktop-file-utils
, libxml2
, wrapGAppsHook4
, openssl
, dbus
, libadwaita
, gst_all_1
, Foundation
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
stdenv.mkDerivation rec {
pname = "netease-cloud-music-gtk";
version = "1.2.2";
version = "2.0.1";
src = fetchFromGitHub {
owner = "gmg137";
repo = "netease-cloud-music-gtk";
repo = pname;
rev = version;
sha256 = "sha256-42MaylfG5LY+TiYHWQMoh9CiVLShKXSBpMrxdWhujow=";
hash = "sha256-dlJZvmfw9+cavAysxVzCekgPdygg5zbU3ZR5BOjPk08=";
};
patches = [ ./cargo-lock.patch ];
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src patches;
hash = "sha256-mJyjWEBsLhHwJCeZyRdby/K/jse0F9UBwfQxkNtZito=";
};
cargoSha256 = "sha256-A9wIcESdaJwLY4g/QlOxMU5PBB9wjvIzaXBSqeiRJBM=";
cargoPatches = [ ./cargo-lock.patch ];
nativeBuildInputs = [
glib
gtk3
dbus
meson
ninja
pkg-config
wrapGAppsHook
];
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
]);
buildInputs = [
glib
gtk3
curl
dbus
openssl
dbus
libadwaita
] ++ (with gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
]);
postPatch = ''
install -D netease-cloud-music-gtk.desktop $out/share/applications/netease-cloud-music-gtk.desktop
install -D icons/netease-cloud-music-gtk.svg $out/share/icons/hicolor/scalable/apps/netease-cloud-music-gtk.svg
'';
]) ++ lib.optionals stdenv.isDarwin [
Foundation
SystemConfiguration
];
meta = with lib; {
description = "netease-cloud-music-gtk is a Rust + GTK based netease cloud music player";
description = "A Rust + GTK based netease cloud music player";
homepage = "https://github.com/gmg137/netease-cloud-music-gtk";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ diffumist ];
mainProgram = "netease-cloud-music-gtk4";
};
}

View File

@ -6,7 +6,7 @@
set -eu -vx
here=$PWD
version=$(cat default.nix | rg '^ version = "' | cut -d '"' -f 2)
version=$(rg '^ version = "' default.nix | cut -d '"' -f 2)
checkout=$(mktemp -d)
git clone -b "$version" --depth=1 https://github.com/gmg137/netease-cloud-music-gtk "$checkout"

View File

@ -25399,7 +25399,9 @@ with pkgs;
netease-music-tui = callPackage ../applications/audio/netease-music-tui { };
netease-cloud-music-gtk = callPackage ../applications/audio/netease-cloud-music-gtk { };
netease-cloud-music-gtk = callPackage ../applications/audio/netease-cloud-music-gtk {
inherit (darwin.apple_sdk.frameworks) Foundation SystemConfiguration;
};
nordic = callPackage ../data/themes/nordic { };