1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00

netease-cloud-music-gtk: init at 1.2.2

This commit is contained in:
Diffumist 2021-11-10 18:02:17 +08:00
parent 35acd3ed18
commit 7148439d89
No known key found for this signature in database
GPG key ID: C68CA02B61625AEB
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 {})