2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
2022-09-09 14:08:57 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2022-09-09 14:08:57 +00:00
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, gdk-pixbuf
|
|
|
|
, gettext
|
|
|
|
, librsvg
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ymuse";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.22";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yktoo";
|
|
|
|
repo = "ymuse";
|
|
|
|
rev = "v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-WbIeqOAhdqxU8EvHEsG7ASwy5xZG1domZKT5ccOggHg=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
vendorHash = "sha256-YT4JiieVI6/t4inezE3K2WQBI51W+/MoWr7R/uBzn+8=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2022-09-09 14:08:57 +00:00
|
|
|
glib
|
|
|
|
gobject-introspection
|
|
|
|
gdk-pixbuf
|
|
|
|
gettext
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
librsvg
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-09-22 12:36:57 +00:00
|
|
|
install -Dm644 ./resources/com.yktoo.ymuse.desktop -t $out/share/applications
|
|
|
|
install -Dm644 ./resources/metainfo/com.yktoo.ymuse.metainfo.xml -t $out/share/metainfo
|
2022-09-09 14:08:57 +00:00
|
|
|
cp -r ./resources/icons $out/share
|
|
|
|
|
|
|
|
app_id="ymuse"
|
|
|
|
find ./resources/i18n -type f -name '*.po' |
|
|
|
|
while read file; do
|
|
|
|
# Language is the filename without the extension
|
|
|
|
lang="$(basename "$file")"
|
|
|
|
lang="''${lang%.*}"
|
|
|
|
|
|
|
|
# Create the target dir if needed
|
|
|
|
target_dir="$out/share/locale/$lang/LC_MESSAGES"
|
|
|
|
mkdir -p "$target_dir"
|
|
|
|
|
|
|
|
# Compile the .po into a .mo
|
|
|
|
echo "Compiling $file" into "$target_dir/$app_id.mo"
|
|
|
|
msgfmt "$file" -o "$target_dir/$app_id.mo"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
# IDK how to deal with tests that open up display.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://yktoo.com/en/software/ymuse/";
|
|
|
|
description = "GTK client for Music Player Daemon (MPD)";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ foo-dogsquared ];
|
2023-10-19 13:55:26 +00:00
|
|
|
mainProgram = "ymuse";
|
|
|
|
platforms = platforms.unix;
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|