Merge pull request #287475 from Aleksanaa/waylyrics
waylyrics: unstable-2023-05-14 -> 0.2.4
This commit is contained in:
commit
d267f8179e
2946
pkgs/applications/audio/waylyrics/Cargo.lock
generated
Normal file
2946
pkgs/applications/audio/waylyrics/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,59 +1,61 @@
|
||||
{ lib, fetchFromGitHub, rustPlatform, gtk4, pkg-config, openssl, dbus, wrapGAppsHook4, glib, makeDesktopItem, copyDesktopItems }:
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, wrapGAppsHook4
|
||||
, openssl
|
||||
, dbus
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "waylyrics";
|
||||
version = "unstable-2023-05-14";
|
||||
version = "0.2.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "poly000";
|
||||
repo = pname;
|
||||
rev = "7e8bd99e1748a5448c1a5c49f0664bd96fbf965e";
|
||||
hash = "sha256-vSYtLsLvRHCCHxomPSHifXFZKjkFrlskNp7IlFflrUU=";
|
||||
repo = "waylyrics";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Tpsk1KL+QSiv8aWl8N5hextKnhMulI3YWtQvB6IIdmQ=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-dpJa0T6xapCBPM5fWbSDEhBlZ55c3Sr5oTnu58B/voM=";
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"ncmapi-0.1.13" = "sha256-wh9RsyuS1L7rnz1jh2A27s6wUvyH8cNgUywPORIimmg=";
|
||||
"qqmusic-rs-0.1.0" = "sha256-woLsO0n+m3EBUI+PRLio7iLp0UPQSliWK0djCSZEaZc=";
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook4 copyDesktopItems ];
|
||||
buildInputs = [ gtk4 openssl dbus glib ];
|
||||
postPatch = ''
|
||||
cp ${./Cargo.lock} Cargo.lock
|
||||
'';
|
||||
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook4 ];
|
||||
buildInputs = [ openssl dbus ];
|
||||
|
||||
doCheck = false; # No tests defined in the project.
|
||||
doCheck = false; # Requires network access
|
||||
|
||||
WAYLYRICS_DEFAULT_CONFIG = "${placeholder "out"}/share/waylyrics/config.toml";
|
||||
WAYLYRICS_THEME_PRESETS_DIR = "${placeholder "out"}/share/waylyrics/themes";
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "io.poly000.waylyrics";
|
||||
exec = "waylyrics";
|
||||
comment = "Simple on screen lyrics for MPRIS-friendly players";
|
||||
type = "Application";
|
||||
icon = "io.poly000.waylyrics";
|
||||
desktopName = "Waylyrics";
|
||||
terminal = false;
|
||||
categories = [ "Audio" "AudioVideo" ];
|
||||
})
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
$out/bin/gen_config_example
|
||||
mkdir -p $out/share/waylyrics
|
||||
install -Dm644 config.toml $WAYLYRICS_DEFAULT_CONFIG
|
||||
cp -vr themes $out/share/waylyrics/
|
||||
rm $out/bin/gen_config_example # Unnecessary for end users
|
||||
# Install themes
|
||||
install -d $WAYLYRICS_THEME_PRESETS_DIR
|
||||
cp -vr themes/* $WAYLYRICS_THEME_PRESETS_DIR
|
||||
# Install desktop entry
|
||||
install -Dm644 io.poly000.waylyrics.desktop -t $out/share/applications
|
||||
# Install schema
|
||||
install -Dm644 io.poly000.waylyrics.gschema.xml -t $out/share/gsettings-schemas/$name/glib-2.0/schemas
|
||||
glib-compile-schemas $out/share/gsettings-schemas/$name/glib-2.0/schemas/
|
||||
# Install icons
|
||||
cp -vr res/icons $out/share/
|
||||
install -d $out/share/icons
|
||||
cp -vr res/icons/hicolor $out/share/icons/hicolor
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "On screen lyrics for Wayland with NetEase Music source";
|
||||
description = "Desktop lyrics with QQ and NetEase Music source";
|
||||
homepage = "https://github.com/poly000/waylyrics";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.shadowrz ];
|
||||
license = with licenses; [ mit cc-by-40 ];
|
||||
maintainers = with maintainers; [ shadowrz aleksana ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user