2024-04-30 18:04:06 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gitUpdater,
|
|
|
|
makeFontsConf,
|
|
|
|
buildLua,
|
|
|
|
buildGoModule,
|
2023-11-29 13:40:21 +00:00
|
|
|
}:
|
2023-03-07 00:53:20 +00:00
|
|
|
|
2023-11-29 13:24:05 +00:00
|
|
|
buildLua (finalAttrs: {
|
2023-03-07 00:53:20 +00:00
|
|
|
pname = "uosc";
|
2024-09-21 12:35:57 +00:00
|
|
|
version = "5.6.0";
|
2023-11-29 13:40:21 +00:00
|
|
|
scriptPath = "src/uosc";
|
2023-03-07 00:53:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomasklaen";
|
|
|
|
repo = "uosc";
|
|
|
|
rev = finalAttrs.version;
|
2024-09-21 12:35:57 +00:00
|
|
|
hash = "sha256-oEU1mPDzaW5j6zMpnSn1baQ+qlr/MtErxRfiyVBWMHU=";
|
2023-03-07 00:53:20 +00:00
|
|
|
};
|
2024-04-30 18:04:06 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
2023-03-07 00:53:20 +00:00
|
|
|
|
2023-11-29 13:40:21 +00:00
|
|
|
tools = buildGoModule {
|
|
|
|
pname = "uosc-bin";
|
|
|
|
inherit (finalAttrs) version src;
|
|
|
|
vendorHash = "sha256-nkY0z2GiDxfNs98dpe+wZNI3dAXcuHaD/nHiZ2XnZ1Y=";
|
|
|
|
};
|
2023-03-07 00:53:20 +00:00
|
|
|
|
|
|
|
# the script uses custom "texture" fonts as the background for ui elements.
|
|
|
|
# In order for mpv to find them, we need to adjust the fontconfig search path.
|
2023-11-29 13:40:21 +00:00
|
|
|
postInstall = "cp -r src/fonts $out/share";
|
2023-03-07 00:53:20 +00:00
|
|
|
passthru.extraWrapperArgs = [
|
|
|
|
"--set"
|
|
|
|
"FONTCONFIG_FILE"
|
|
|
|
(toString (makeFontsConf {
|
|
|
|
fontDirectories = [ "${finalAttrs.finalPackage}/share/fonts" ];
|
|
|
|
}))
|
2023-11-29 13:40:21 +00:00
|
|
|
"--set"
|
|
|
|
"MPV_UOSC_ZIGGY"
|
|
|
|
(lib.getExe' finalAttrs.tools "ziggy")
|
2023-03-07 00:53:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Feature-rich minimalist proximity-based UI for MPV player";
|
|
|
|
homepage = "https://github.com/tomasklaen/uosc";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [ apfelkuchen6 ];
|
|
|
|
};
|
|
|
|
})
|