28 # Finds data files using the XDG Base Directory Specification
29 # See https://specifications.freedesktop.org/basedir-spec/latest
30 find-xdg-data-files = writeScriptBin "find-xdg-data-files" ''
33 for xdg_data_dir in ''${XDG_DATA_HOME:-$HOME/.local/share}:''${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do
34 if [ -f "$xdg_data_dir/$1" ]; then
35 echo "$xdg_data_dir/$1"
39 in stdenv.mkDerivation rec {
43 src = fetchFromGitHub {
44 owner = "benjamimgois";
47 sha256 = "sha256-oXkGrMHjs8uui0pzGYW8jnttet/5IX0r8eat0n5saFk=";
50 outputs = [ "out" "man" ];
53 # Find MangoHud & vkBasalt Vulkan layers using the XDG Base Directory Specification
54 ./find-xdg-data-files.patch
58 substituteInPlace Makefile \
59 --replace 'prefix = /usr/local' "prefix = $out"
61 substituteInPlace overlayunit.pas \
62 --replace '/usr/share/icons/hicolor/128x128/apps/goverlay.png' "$out/share/icons/hicolor/128x128/apps/goverlay.png"
79 NIX_LDFLAGS = "-lGLU -rpath ${lib.makeLibraryPath buildInputs}";
83 HOME=$(mktemp -d) lazbuild --lazarusdir=${lazarus-qt}/share/lazarus -B goverlay.lpi
88 "--prefix PATH : ${lib.makeBinPath [
103 # Force xcb since libqt5pas doesn't support Wayland
104 # See https://github.com/benjamimgois/goverlay/issues/107
105 "--set QT_QPA_PLATFORM xcb"
108 passthru.updateScript = nix-update-script { };
111 description = "Opensource project that aims to create a Graphical UI to help manage Linux overlays";
112 homepage = "https://github.com/benjamimgois/goverlay";
113 license = licenses.gpl3Plus;
114 maintainers = with maintainers; [ ];
115 platforms = platforms.linux;
116 mainProgram = "goverlay";