-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
boinc: update to version 7.2.42, new nixos service #2526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| { config, pkgs, ... }: | ||
|
|
||
| with pkgs.lib; | ||
|
|
||
| let | ||
| cfg = config.services.boinc; | ||
| in | ||
| { | ||
| options = { | ||
|
|
||
| services.boinc = { | ||
|
|
||
| enable = mkOption { | ||
| default = false; | ||
| description = "Whether to enable the Berkeley Open Infrastructure for Network Computing (BOINC) worker."; | ||
| }; | ||
|
|
||
| home = mkOption { | ||
| default = "/var/lib/boinc"; | ||
| description = "Location of BOINC work directory."; | ||
| }; | ||
|
|
||
| user = mkOption { | ||
| default = "nobody"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe boinc should run as "boinc" user? The more services running as "nobody" makes the nobody account more and more privileged :-) |
||
| description = "User that shall run BOINC."; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| config = mkIf cfg.enable { | ||
|
|
||
| environment.systemPackages = [ pkgs.boinc ]; | ||
|
|
||
| systemd.services.boinc = { | ||
| description = "Berkeley Open Infrastructure for Network Computing worker"; | ||
| wantedBy = [ "multi-user.target" ]; | ||
| after = [ "network.target" ]; | ||
| path = [ pkgs.boinc ]; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it necessary to have |
||
| serviceConfig = { | ||
| Type = "simple"; | ||
| ExecStart = "${pkgs.boinc}/bin/boinc"; | ||
| User = cfg.user; | ||
| WorkingDirectory = cfg.home; | ||
| CPUSchedulingPolicy = "idle"; | ||
| IOSchedulingClass = "idle"; | ||
| }; | ||
| }; | ||
|
|
||
| system.activationScripts.boinc = '' | ||
| ${pkgs.coreutils}/bin/mkdir -p "${cfg.home}" | ||
| ${pkgs.coreutils}/bin/chown -R "${cfg.user}" "${cfg.home}" | ||
| ''; | ||
| }; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,43 +1,41 @@ | ||
| #TODO: build without GUI for headless operation. | ||
|
|
||
| { fetchgit, stdenv, autoconf, automake, pkgconfig, m4, curl, | ||
| mesa, libXmu, libXi, freeglut, libjpeg, libtool, wxGTK, xcbutil, | ||
| sqlite, gtk, patchelf, libXScrnSaver, libnotify, libX11, libxcb }: | ||
|
|
||
| let | ||
| version = "7.2.42"; | ||
| in | ||
| stdenv.mkDerivation rec { | ||
| name = "boinc-7.0.44"; | ||
| name = "boinc-${version}"; | ||
|
|
||
| src = fetchgit { | ||
| url = "git://boinc.berkeley.edu/boinc-v2.git"; | ||
| rev = "7c449b1fb8a681ceb27d6895751b62a2b3adf0f2"; | ||
| sha256 = "0hdramyl9nip3gadp7xiaz8ngyld15i93d8ai1nsd04bmrvdfqia"; | ||
| url = git://boinc.berkeley.edu/boinc-v2.git; | ||
| rev = "refs/tags/client_release/7.2/${version}"; | ||
| sha256 = "1zifpi3mjgaj68fba6kammp3x7z8n2x164zz6fj91xfiapnan56j"; | ||
| }; | ||
|
|
||
| buildInputs = [ libtool automake autoconf m4 pkgconfig curl mesa libXmu libXi | ||
| freeglut libjpeg wxGTK sqlite gtk libXScrnSaver libnotify patchelf libX11 | ||
| libxcb xcbutil | ||
| ]; | ||
|
|
||
| postConfigure = '' | ||
| sed -i -e s,/etc,$out/etc, client/scripts/Makefile | ||
| ''; | ||
| patches = [ ./no-runscript.patch ]; | ||
|
|
||
| NIX_LDFLAGS = "-lX11"; | ||
|
|
||
| preConfigure = '' | ||
| ./_autosetup | ||
| configureFlags="$configureFlags --sysconfdir=$out/etc" | ||
| ''; | ||
| preConfigure = "./_autosetup"; | ||
|
|
||
| enableParallelBuilding = true; | ||
|
|
||
| configureFlags = "--disable-server"; | ||
|
|
||
| meta = { | ||
| description = "Free software for distributed and grid computing"; | ||
|
|
||
| homepage = http://boinc.berkeley.edu/; | ||
|
|
||
| license = "LGPLv2+"; | ||
|
|
||
| license = stdenv.lib.licenses.lgpl21Plus; | ||
| maintainers = [ stdenv.lib.maintainers.emery ]; | ||
| platforms = stdenv.lib.platforms.linux; # arbitrary choice | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/Makefile.am b/Makefile.am | ||
| index 6322db1..9820912 100644 | ||
| --- a/Makefile.am | ||
| +++ b/Makefile.am | ||
| @@ -21,7 +21,7 @@ if ENABLE_SERVER | ||
| endif | ||
|
|
||
| if ENABLE_CLIENT | ||
| - CLIENT_SUBDIRS = client client/scripts | ||
| + CLIENT_SUBDIRS = client | ||
| endif | ||
|
|
||
| if ENABLE_MANAGER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including autfs.nix isn't a part of this pull is it?