2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, autoPatchelfHook
|
|
|
|
, dpkg
|
|
|
|
, fahviewer
|
|
|
|
, fetchurl
|
|
|
|
, makeWrapper
|
|
|
|
, python2
|
|
|
|
}:
|
|
|
|
let
|
2021-01-17 00:15:33 +00:00
|
|
|
majMin = lib.versions.majorMinor version;
|
2020-11-15 13:44:38 +00:00
|
|
|
version = "7.6.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python = python2.withPackages
|
|
|
|
(
|
|
|
|
ps: [
|
|
|
|
ps.pycairo
|
|
|
|
ps.pygobject2
|
|
|
|
ps.pygtk
|
|
|
|
]
|
|
|
|
);
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit version;
|
|
|
|
pname = "fahcontrol";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.foldingathome.org/releases/public/release/fahcontrol/debian-stable-64bit/v${majMin}/fahcontrol_${version}-1_all.deb";
|
2020-11-15 13:44:38 +00:00
|
|
|
sha256 = "1vfrdqkrvdlyxaw3f6z92w5dllrv6810lmf8yhcmjcwmphipvf71";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
dpkg
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ fahviewer python ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
dpkg-deb -x ${src} ./
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = "cp -ar usr $out";
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
sed -e 's|/usr/bin|$out/bin|g' -i $out/share/applications/FAHControl.desktop
|
|
|
|
wrapProgram "$out/bin/FAHControl" \
|
|
|
|
--suffix PATH : "${fahviewer.outPath}/bin" \
|
|
|
|
--set PYTHONPATH "$out/lib/python2.7/dist-packages"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Folding@home control";
|
|
|
|
homepage = "https://foldingathome.org/";
|
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" ];
|
|
|
|
};
|
|
|
|
}
|