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
84 lines
1.8 KiB
Nix
84 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
glibmm,
|
|
gtk4-layer-shell,
|
|
gtkmm4,
|
|
libevdev,
|
|
nix-update-script,
|
|
pkg-config,
|
|
wireplumber,
|
|
wrapGAppsHook4,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "syshud";
|
|
version = "0-unstable-2025-10-06";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "System64fumo";
|
|
repo = "syshud";
|
|
rev = "60d3e362cf6983e7d7ebea7584a8bd84eb815f4c";
|
|
hash = "sha256-GxJWGRm7N/TgvAtuWXjusyUT7Pnuw0uIySp6i6Kn7Gs=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/main.cpp \
|
|
--replace-fail /usr/share/sys64/hud/config.conf $out/share/sys64/hud/config.conf
|
|
substituteInPlace src/window.cpp \
|
|
--replace-fail /usr/share/sys64/hud/style.css $out/share/sys64/hud/style.css
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
wrapGAppsHook4
|
|
];
|
|
|
|
buildInputs = [
|
|
glibmm
|
|
gtk4-layer-shell
|
|
gtkmm4
|
|
libevdev
|
|
wireplumber
|
|
];
|
|
|
|
makeFlags = [
|
|
"DESTDIR=${placeholder "out"}"
|
|
"PREFIX="
|
|
];
|
|
|
|
# populate version info used by `syshud -v`:
|
|
configurePhase = ''
|
|
runHook preConfigure
|
|
|
|
echo '#define GIT_COMMIT_MESSAGE "${finalAttrs.src.rev}"' >> src/git_info.hpp
|
|
echo '#define GIT_COMMIT_DATE "${lib.removePrefix "0-unstable-" finalAttrs.version}"' >> src/git_info.hpp
|
|
|
|
runHook postConfigure
|
|
'';
|
|
|
|
# syshud manually `dlopen`'s its library component
|
|
postInstall = ''
|
|
wrapProgram $out/bin/syshud --prefix LD_LIBRARY_PATH : $out/lib
|
|
'';
|
|
|
|
strictDeps = true;
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version"
|
|
"branch"
|
|
];
|
|
};
|
|
|
|
meta = {
|
|
description = "Simple heads up display written in gtkmm 4";
|
|
mainProgram = "syshud";
|
|
homepage = "https://github.com/System64fumo/syshud";
|
|
license = lib.licenses.wtfpl;
|
|
platforms = lib.platforms.linux;
|
|
maintainers = with lib.maintainers; [ colinsane ];
|
|
};
|
|
})
|