mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
gitUpdater,
|
|
makeFontsConf,
|
|
buildLua,
|
|
buildGoModule,
|
|
}:
|
|
|
|
buildLua (finalAttrs: {
|
|
pname = "uosc";
|
|
version = "5.6.0";
|
|
scriptPath = "src/uosc";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tomasklaen";
|
|
repo = "uosc";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-oEU1mPDzaW5j6zMpnSn1baQ+qlr/MtErxRfiyVBWMHU=";
|
|
};
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
tools = buildGoModule {
|
|
pname = "uosc-bin";
|
|
inherit (finalAttrs) version src;
|
|
vendorHash = "sha256-nkY0z2GiDxfNs98dpe+wZNI3dAXcuHaD/nHiZ2XnZ1Y=";
|
|
};
|
|
|
|
# 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.
|
|
postInstall = "cp -r src/fonts $out/share";
|
|
passthru.extraWrapperArgs = [
|
|
"--set"
|
|
"FONTCONFIG_FILE"
|
|
(toString (makeFontsConf {
|
|
fontDirectories = [ "${finalAttrs.finalPackage}/share/fonts" ];
|
|
}))
|
|
"--set"
|
|
"MPV_UOSC_ZIGGY"
|
|
(lib.getExe' finalAttrs.tools "ziggy")
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
})
|