2021-04-26 19:14:03 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
2021-10-17 02:12:59 +00:00
|
|
|
, substituteAll
|
2021-04-26 19:14:03 +00:00
|
|
|
, appstream-glib
|
|
|
|
, desktop-file-utils
|
|
|
|
, gettext
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gst_all_1
|
2021-05-28 09:39:13 +00:00
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
2021-04-26 19:14:03 +00:00
|
|
|
, librsvg
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2021-10-17 02:12:59 +00:00
|
|
|
, pulseaudio
|
2022-06-16 17:23:12 +00:00
|
|
|
, wrapGAppsHook4
|
2021-04-26 19:14:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "mousai";
|
2021-10-17 02:12:59 +00:00
|
|
|
version = "0.6.6";
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SeaDve";
|
|
|
|
repo = "Mousai";
|
|
|
|
rev = "v${version}";
|
2021-10-17 02:12:59 +00:00
|
|
|
sha256 = "sha256-nCbFVFg+nVF8BOBfdzQVgdTRXR5UF18PJFC266yTFwg=";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./paths.patch;
|
|
|
|
pactl = "${lib.getBin pulseaudio}/bin/pactl";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
postPatch = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
substituteInPlace build-aux/meson/postinstall.py \
|
|
|
|
--replace gtk-update-icon-cache gtk4-update-icon-cache
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
patchShebangs build-aux/meson
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
appstream-glib
|
|
|
|
desktop-file-utils
|
|
|
|
gettext
|
|
|
|
glib
|
2021-05-28 09:39:13 +00:00
|
|
|
gtk4
|
2021-04-26 19:14:03 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
2022-06-16 17:23:12 +00:00
|
|
|
wrapGAppsHook4
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gst-plugins-good
|
2021-05-28 09:39:13 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2021-04-26 19:14:03 +00:00
|
|
|
librsvg
|
2021-10-17 02:12:59 +00:00
|
|
|
pulseaudio
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
pygobject3
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Identify any songs in seconds";
|
|
|
|
homepage = "https://github.com/SeaDve/Mousai";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|