Files
nixpkgs/pkgs/by-name/go/goverlay/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

108 lines
2.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
bash,
coreutils,
fpc,
git,
gnugrep,
iproute2,
lazarus-qt6,
libGL,
libGLU,
libnotify,
libX11,
nix-update-script,
pciutils,
polkit,
procps,
qt6Packages,
systemd,
util-linux,
vulkan-tools,
which,
}:
stdenv.mkDerivation rec {
pname = "goverlay";
version = "1.3-2";
src = fetchFromGitHub {
owner = "benjamimgois";
repo = "goverlay";
rev = version;
sha256 = "sha256-Vxmmsf/l3OK1Q6UKdhCWvU4WPJkdQG2Hn+s9tS+D5KM=";
};
outputs = [
"out"
"man"
];
postPatch = ''
substituteInPlace Makefile \
--replace-fail 'prefix = /usr/local' "prefix = $out"
substituteInPlace overlayunit.pas \
--replace-fail '/usr/share/icons/hicolor/128x128/apps/goverlay.png' "$out/share/icons/hicolor/128x128/apps/goverlay.png" \
--replace-fail '/sbin/ip' "${lib.getExe' iproute2 "ip"}" \
--replace-fail '/bin/bash' "${lib.getExe' bash "bash"}" \
--replace-fail '/bin/uname' "${lib.getExe' coreutils "uname"}" \
--replace-fail '/usr/bin/lspci' "${lib.getExe' pciutils "lspci"}" \
--replace-fail "FONTFOLDER := '/usr/share/fonts/'" "FONTFOLDER := GetEnvironmentVariable('HOME') + '/.local/share/fonts/'" \
--replace-fail "'/usr/share/fonts/'" 'FONTFOLDER'
'';
nativeBuildInputs = [
fpc
lazarus-qt6
qt6Packages.wrapQtAppsHook
];
buildInputs = [
libGL
libGLU
qt6Packages.libqtpas
libX11
qt6Packages.qtbase
];
NIX_LDFLAGS = "-lGLU -lGL -rpath ${lib.makeLibraryPath buildInputs}";
buildPhase = ''
runHook preBuild
HOME=$(mktemp -d) lazbuild --lazarusdir=${lazarus-qt6}/share/lazarus -B goverlay.lpi
runHook postBuild
'';
qtWrapperArgs = [
"--prefix PATH : ${
lib.makeBinPath [
bash
coreutils
git
gnugrep
libnotify
polkit
procps
systemd
util-linux.bin
vulkan-tools
which
]
}"
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Opensource project that aims to create a Graphical UI to help manage Linux overlays";
homepage = "https://github.com/benjamimgois/goverlay";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ RoGreat ];
platforms = platforms.linux;
mainProgram = "goverlay";
};
}