2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, autoPatchelfHook
|
|
|
|
, buildFHSUserEnv
|
|
|
|
, dpkg
|
|
|
|
, fetchurl
|
|
|
|
, gcc-unwrapped
|
|
|
|
, ocl-icd
|
|
|
|
, zlib
|
|
|
|
, extraPkgs ? []
|
|
|
|
}:
|
|
|
|
let
|
2021-01-17 00:15:33 +00:00
|
|
|
majMin = lib.versions.majorMinor version;
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "7.6.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
fahclient = stdenv.mkDerivation rec {
|
|
|
|
inherit version;
|
|
|
|
pname = "fahclient";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v${majMin}/fahclient_${version}_amd64.deb";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "2827f05f1c311ee6c7eca294e4ffb856c81957e8f5bfc3113a0ed27bb463b094";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gcc-unwrapped.lib
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
unpackPhase = "dpkg-deb -x ${src} ./";
|
|
|
|
installPhase = "cp -ar usr $out";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
buildFHSUserEnv {
|
|
|
|
name = fahclient.name;
|
|
|
|
|
|
|
|
targetPkgs = pkgs': [
|
|
|
|
fahclient
|
|
|
|
ocl-icd
|
|
|
|
] ++ extraPkgs;
|
|
|
|
|
|
|
|
runScript = "/bin/FAHClient";
|
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
mv $out/bin/$name $out/bin/FAHClient
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Folding@home client";
|
|
|
|
homepage = "https://foldingathome.org/";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.unfree;
|
|
|
|
maintainers = [ lib.maintainers.zimbatm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|