boinc: add headless option

Added headless option and packages entry. Switches config flag --disable-manager and omits X/GUI related libs
This commit is contained in:
Jack Connors 2023-07-18 11:44:27 +01:00
parent 752398b625
commit 3f99b556de
2 changed files with 8 additions and 4 deletions

View file

@ -22,6 +22,7 @@
, libnotify
, libX11
, libxcb
, headless ? false
}:
stdenv.mkDerivation rec {
@ -40,6 +41,9 @@ stdenv.mkDerivation rec {
buildInputs = [
curl
sqlite
patchelf
] ++ lib.optionals (!headless) [
libGLU
libGL
libXmu
@ -47,17 +51,15 @@ stdenv.mkDerivation rec {
freeglut
libjpeg
wxGTK32
sqlite
gtk3
libXScrnSaver
libnotify
patchelf
libX11
libxcb
xcbutil
];
NIX_LDFLAGS = "-lX11";
NIX_LDFLAGS = lib.optionalString (!headless) "-lX11";
preConfigure = ''
./_autosetup
@ -66,7 +68,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
configureFlags = [ "--disable-server" ];
configureFlags = [ "--disable-server" ] ++ lib.optionals headless [ "--disable-manager" ];
postInstall = ''
install --mode=444 -D 'client/scripts/boinc-client.service' "$out/etc/systemd/system/boinc.service"

View file

@ -39259,6 +39259,8 @@ with pkgs;
boinc = callPackage ../applications/science/misc/boinc { };
boinc-headless = callPackage ../applications/science/misc/boinc { headless = true; };
celestia = callPackage ../applications/science/astronomy/celestia {
autoreconfHook = buildPackages.autoreconfHook269;
inherit (gnome2) gtkglext;