Merge pull request #145320 from Diffumist/netease-cloud-music-gtk

This commit is contained in:
Maciej Krüger 2021-11-10 11:20:47 +01:00 committed by GitHub
commit c1c7dd133b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2090 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,61 @@
{ lib
, stdenv
, glib
, gtk3
, curl
, dbus
, openssl
, gst_all_1
, pkg-config
, rustPlatform
, wrapGAppsHook
, fetchurl
, fetchFromGitHub
, makeDesktopItem
}:
rustPlatform.buildRustPackage rec {
pname = "netease-cloud-music-gtk";
version = "1.2.2";
src = fetchFromGitHub {
owner = "gmg137";
repo = "netease-cloud-music-gtk";
rev = version;
sha256 = "sha256-42MaylfG5LY+TiYHWQMoh9CiVLShKXSBpMrxdWhujow=";
};
cargoSha256 = "sha256-A9wIcESdaJwLY4g/QlOxMU5PBB9wjvIzaXBSqeiRJBM=";
cargoPatches = [ ./cargo-lock.patch ];
nativeBuildInputs = [
glib
gtk3
dbus
pkg-config
wrapGAppsHook
];
buildInputs = [
glib
gtk3
curl
dbus
openssl
] ++ (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
'';
meta = with lib; {
description = "netease-cloud-music-gtk is a Rust + GTK based netease cloud music player";
homepage = "https://github.com/gmg137/netease-cloud-music-gtk";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ diffumist ];
};
}

View file

@ -0,0 +1,20 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils ripgrep git cargo
# Ref: https://github.com/NixOS/nixpkgs/blob/nixos-21.05/pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh
set -eu -vx
here=$PWD
version=$(cat default.nix | rg '^ version = "' | cut -d '"' -f 2)
checkout=$(mktemp -d)
git clone -b "$version" --depth=1 https://github.com/gmg137/netease-cloud-music-gtk "$checkout"
cd "$checkout"
cargo generate-lockfile
git add -f Cargo.lock
git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch
cd "$here"
rm -rf "$checkout"

View file

@ -23268,6 +23268,8 @@ with pkgs;
netease-music-tui = callPackage ../applications/audio/netease-music-tui { };
netease-cloud-music-gtk = callPackage ../applications/audio/netease-cloud-music-gtk { };
nordic = callPackage ../data/themes/nordic { };
inherit (callPackages ../data/fonts/noto-fonts {})