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 { lib
, stdenv , stdenv
, glib
, gtk3
, curl
, dbus
, openssl
, gst_all_1
, pkg-config
, rustPlatform
, wrapGAppsHook
, fetchurl
, fetchFromGitHub , 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"; pname = "netease-cloud-music-gtk";
version = "1.2.2"; version = "2.0.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "gmg137"; owner = "gmg137";
repo = "netease-cloud-music-gtk"; repo = pname;
rev = version; 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 = [ nativeBuildInputs = [
glib meson
gtk3 ninja
dbus
pkg-config 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 = [ buildInputs = [
glib
gtk3
curl
dbus
openssl openssl
dbus
libadwaita
] ++ (with gst_all_1; [ ] ++ (with gst_all_1; [
gstreamer gstreamer
gst-plugins-base gst-plugins-base
gst-plugins-good gst-plugins-good
gst-plugins-bad gst-plugins-bad
gst-plugins-ugly gst-plugins-ugly
]); ]) ++ lib.optionals stdenv.isDarwin [
Foundation
postPatch = '' SystemConfiguration
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
'';
meta = with lib; { 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"; homepage = "https://github.com/gmg137/netease-cloud-music-gtk";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = with maintainers; [ diffumist ]; maintainers = with maintainers; [ diffumist ];
mainProgram = "netease-cloud-music-gtk4";
}; };
} }

View File

@ -6,7 +6,7 @@
set -eu -vx set -eu -vx
here=$PWD here=$PWD
version=$(cat default.nix | rg '^ version = "' | cut -d '"' -f 2) version=$(rg '^ version = "' default.nix | cut -d '"' -f 2)
checkout=$(mktemp -d) checkout=$(mktemp -d)
git clone -b "$version" --depth=1 https://github.com/gmg137/netease-cloud-music-gtk "$checkout" 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-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 { }; nordic = callPackage ../data/themes/nordic { };