forked from mirrors/nixpkgs
netease-cloud-music-gtk: init at 1.2.2
This commit is contained in:
parent
35acd3ed18
commit
7148439d89
2007
pkgs/applications/audio/netease-cloud-music-gtk/cargo-lock.patch
Normal file
2007
pkgs/applications/audio/netease-cloud-music-gtk/cargo-lock.patch
Normal file
File diff suppressed because it is too large
Load diff
61
pkgs/applications/audio/netease-cloud-music-gtk/default.nix
Normal file
61
pkgs/applications/audio/netease-cloud-music-gtk/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
20
pkgs/applications/audio/netease-cloud-music-gtk/update-cargo-lock.sh
Executable file
20
pkgs/applications/audio/netease-cloud-music-gtk/update-cargo-lock.sh
Executable 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"
|
|
@ -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 {})
|
||||
|
|
Loading…
Reference in a new issue