goverlay: 1.3-2 -> 1.6.1, pascube: init at 1.5.1 (#451539)

This commit is contained in:
Sandro
2025-11-17 14:35:56 +00:00
committed by GitHub
2 changed files with 145 additions and 55 deletions

View File

@@ -1,38 +1,36 @@
{ {
lib, autoPatchelfHook,
stdenv,
fetchFromGitHub,
bash,
coreutils, coreutils,
fetchFromGitHub,
fontconfig,
fpc, fpc,
git,
gnugrep, gnugrep,
gnused,
iproute2, iproute2,
kmod,
lazarus-qt6, lazarus-qt6,
libGL, lib,
libGLU,
libnotify, libnotify,
libX11, mangohud,
nix-update-script, nix-update-script,
p7zip,
pascube,
pciutils, pciutils,
polkit, polkit,
procps,
qt6Packages, qt6Packages,
systemd, stdenv,
util-linux, wget,
vulkan-tools,
which,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "goverlay"; pname = "goverlay";
version = "1.3-2"; version = "1.6.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "benjamimgois"; owner = "benjamimgois";
repo = "goverlay"; repo = "goverlay";
rev = version; tag = finalAttrs.version;
sha256 = "sha256-Vxmmsf/l3OK1Q6UKdhCWvU4WPJkdQG2Hn+s9tS+D5KM="; hash = "sha256-uJdX0Q8SO16U4AuDZWGeEFwVW0m8c4gNeAntWSWLvoU=";
}; };
outputs = [ outputs = [
@@ -41,67 +39,63 @@ stdenv.mkDerivation rec {
]; ];
postPatch = '' postPatch = ''
substituteInPlace Makefile \ substituteInPlace data/goverlay.sh.in --replace-fail 'mangohud' "${lib.getExe' mangohud "mangohud"}"
--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 = [ nativeBuildInputs = [
autoPatchelfHook
fpc fpc
lazarus-qt6 lazarus-qt6
qt6Packages.wrapQtAppsHook qt6Packages.wrapQtAppsHook
]; ];
buildInputs = [ buildInputs = [
libGL
libGLU
qt6Packages.libqtpas qt6Packages.libqtpas
libX11
qt6Packages.qtbase qt6Packages.qtbase
]; ];
NIX_LDFLAGS = "-lGLU -lGL -rpath ${lib.makeLibraryPath buildInputs}"; installPhase = ''
runHook preInstall
make prefix=$out install
runHook postInstall
'';
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
HOME=$(mktemp -d) lazbuild --lazarusdir=${lazarus-qt6}/share/lazarus -B goverlay.lpi HOME=$(mktemp -d) lazbuild --lazarusdir=${lazarus-qt6}/share/lazarus -B goverlay.lpi --bm=Release
runHook postBuild runHook postBuild
''; '';
qtWrapperArgs = [ preFixup = ''
"--prefix PATH : ${ qtWrapperArgs+=(
--suffix PATH : ${
lib.makeBinPath [ lib.makeBinPath [
bash
coreutils coreutils
git fontconfig
gnugrep gnugrep
gnused
iproute2
kmod
libnotify libnotify
mangohud
p7zip
pascube
pciutils
polkit polkit
procps wget
systemd
util-linux.bin
vulkan-tools
which
] ]
}" })
]; '';
passthru.updateScript = nix-update-script { }; passthru.updateScript = nix-update-script { };
meta = with lib; { meta = {
description = "Opensource project that aims to create a Graphical UI to help manage Linux overlays"; description = "Opensource project that aims to create a Graphical UI to help manage Linux overlays";
homepage = "https://github.com/benjamimgois/goverlay"; homepage = "https://github.com/benjamimgois/goverlay";
license = licenses.gpl3Plus; changelog = "https://github.com/benjamimgois/goverlay/releases/tag/${finalAttrs.version}";
maintainers = with maintainers; [ RoGreat ]; license = lib.licenses.gpl3Plus;
platforms = platforms.linux; maintainers = with lib.maintainers; [ RoGreat ];
mainProgram = "goverlay"; mainProgram = "goverlay";
platforms = lib.platforms.linux;
}; };
} })

View File

@@ -0,0 +1,96 @@
{
autoPatchelfHook,
copyDesktopItems,
fetchFromGitHub,
fpc,
lazarus-qt6,
lib,
libGLU,
makeDesktopItem,
nix-update-script,
qt6Packages,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pascube";
version = "1.5.1";
src = fetchFromGitHub {
owner = "benjamimgois";
repo = "pascube";
tag = "v${finalAttrs.version}";
hash = "sha256-djkrMgX3RTTXSLISYpBfdyCIh3/WWODxd473M53iFKE=";
};
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
fpc
lazarus-qt6
qt6Packages.wrapQtAppsHook
];
buildInputs = [
qt6Packages.libqtpas
qt6Packages.qtbase
];
runtimeDependencies = [
libGLU
];
buildPhase = ''
runHook preBuild
HOME=$(mktemp -d) lazbuild \
--lazarusdir=${lazarus-qt6}/share/lazarus \
--widgetset=qt6 \
pascube.lpi
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 pascube $out/bin/pascube
for sz in 128x128 256x256 512x512; do
install -Dm644 "data/icons/''${sz}/pascube.png" \
"$out/share/icons/hicolor/''${sz}/apps/pascube.png"
done
install -Dm644 "data/skybox.png" "$out/share/pascube/skybox.png"
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "pascube";
desktopName = "pasCube";
comment = finalAttrs.meta.description;
exec = finalAttrs.meta.mainProgram;
icon = "pascube";
terminal = false;
categories = [
"Graphics"
"Education"
"Qt"
];
})
];
preFixup = ''
qtWrapperArgs+=(
--set QT_QPA_PLATFORM xcb
)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Simple OpenGL spinning cube written in Pascal";
homepage = "https://github.com/benjamimgois/pascube";
changelog = "https://github.com/benjamimgois/pascube/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ RoGreat ];
mainProgram = "pascube";
platforms = lib.platforms.linux;
};
})