Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 53 lines 1.4 kB view raw
1{ lib 2, mkDerivation 3, wrapQtAppsHook 4, fetchFromGitHub 5, cmake 6, ninja 7, pkg-config 8, eigen 9, zlib 10, libpng 11, boost 12, guile 13, stdenv 14}: 15 16mkDerivation { 17 pname = "libfive-unstable"; 18 version = "2020-02-15"; 19 20 src = fetchFromGitHub { 21 owner = "libfive"; 22 repo = "libfive"; 23 rev = "5b7717a25064478cd6bdb190683566eaf4c7afdd"; 24 sha256 = "102zw2n3vzv84i323is4qrwwqqha8v1cniw54ss8f4bq6dmic0bg"; 25 }; 26 27 nativeBuildInputs = [ wrapQtAppsHook cmake ninja pkg-config ]; 28 buildInputs = [ eigen zlib libpng boost guile ]; 29 30 postInstall = if stdenv.isDarwin then '' 31 # No rules to install the mac app, so do it manually. 32 mkdir -p $out/Applications 33 cp -r studio/Studio.app $out/Applications/Studio.app 34 35 install_name_tool \ 36 -change libfive.dylib $out/lib/libfive.dylib \ 37 -change libfive-guile.dylib $out/lib/libfive-guile.dylib \ 38 $out/Applications/Studio.app/Contents/MacOS/Studio 39 40 wrapQtApp $out/Applications/Studio.app/Contents/MacOS/Studio 41 '' else '' 42 # Link "Studio" binary to "libfive-studio" to be more obvious: 43 ln -s "$out/bin/Studio" "$out/bin/libfive-studio" 44 ''; 45 46 meta = with lib; { 47 description = "Infrastructure for solid modeling with F-Reps in C, C++, and Guile"; 48 homepage = "https://libfive.com/"; 49 maintainers = with maintainers; [ hodapp kovirobi ]; 50 license = with licenses; [ mpl20 gpl2Plus ]; 51 platforms = with platforms; linux ++ darwin; 52 }; 53}