mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
fbda1dbfd6
Allow the macOS GLUT framework to be used automatically in many cases. Packages that specifically search for freeglut or require its additional APIs should still explicitly depend on it. Deliberately skip the Haskell package set, which is mostly automatically generated, and mupdf, which has its own fork of freeglut.
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{ lib, stdenv
|
|
, autoPatchelfHook
|
|
, dpkg
|
|
, fetchurl
|
|
, libglut
|
|
, gcc-unwrapped
|
|
, libGL
|
|
, libGLU
|
|
, makeWrapper
|
|
, zlib
|
|
}:
|
|
let
|
|
majMin = lib.versions.majorMinor version;
|
|
version = "7.6.21";
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
inherit version;
|
|
pname = "fahviewer";
|
|
|
|
src = fetchurl {
|
|
url = "https://download.foldingathome.org/releases/public/release/fahviewer/debian-stable-64bit/v${majMin}/fahviewer_${version}_amd64.deb";
|
|
sha256 = "00fd00pf6fcpplcaahvy9ir60mk69d9rcmwsyq3jrv9mxqm9aq7p";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
autoPatchelfHook
|
|
dpkg
|
|
makeWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
libglut
|
|
gcc-unwrapped.lib
|
|
libGL
|
|
libGLU
|
|
zlib
|
|
];
|
|
|
|
unpackPhase = ''
|
|
dpkg-deb -x ${src} ./
|
|
sed -e "s|/usr/bin|$out/bin|g" -i usr/share/applications/FAHViewer.desktop
|
|
'';
|
|
|
|
installPhase = ''
|
|
cp -ar usr $out
|
|
'';
|
|
|
|
meta = {
|
|
description = "Folding@home viewer";
|
|
homepage = "https://foldingathome.org/";
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
license = lib.licenses.unfree;
|
|
maintainers = [ lib.maintainers.zimbatm ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|