2019-11-10 17:44:34 +01:00
|
|
|
{ stdenv, lib, fetchzip, freeglut, libXmu, libXi, libX11, libICE, libGLU, libGL, libSM, libXext, dialog, makeWrapper }:
|
2017-12-30 20:39:17 +01:00
|
|
|
let
|
2021-01-15 06:42:41 +01:00
|
|
|
lpath = lib.makeLibraryPath [ libXmu libXi libX11 freeglut libICE libGLU libGL libSM libXext ];
|
2017-12-30 20:39:17 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "iceSL";
|
2017-12-30 20:39:17 +01:00
|
|
|
version = "2.1.10";
|
|
|
|
|
2018-08-20 21:11:29 +02:00
|
|
|
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip {
|
2017-12-30 20:39:17 +01:00
|
|
|
url = "https://gforge.inria.fr/frs/download.php/file/37268/icesl${version}-amd64.zip";
|
|
|
|
sha256 = "0dv3mq6wy46xk9blzzmgbdxpsjdaxid3zadfrysxlhmgl7zb2cn2";
|
2018-08-20 21:11:29 +02:00
|
|
|
} else if stdenv.hostPlatform.system == "i686-linux" then fetchzip {
|
2017-12-30 20:39:17 +01:00
|
|
|
url = "https://gforge.inria.fr/frs/download.php/file/37267/icesl${version}-i386.zip";
|
|
|
|
sha256 = "0sl54fsb2gz6dy0bwdscpdq1ab6ph5b7zald3bwzgkqsvna7p1jr";
|
|
|
|
} else throw "Unsupported architecture";
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-12-30 20:39:17 +01:00
|
|
|
installPhase = ''
|
|
|
|
cp -r ./ $out
|
|
|
|
mkdir $out/oldbin
|
|
|
|
mv $out/bin/IceSL-slicer $out/oldbin/IceSL-slicer
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${lpath}" \
|
|
|
|
$out/oldbin/IceSL-slicer
|
|
|
|
makeWrapper $out/oldbin/IceSL-slicer $out/bin/icesl --prefix PATH : ${dialog}/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-26 05:08:40 +01:00
|
|
|
description = "GPU-accelerated procedural modeler and slicer for 3D printing";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://shapeforge.loria.fr/icesl/index.html";
|
2017-12-30 20:39:17 +01:00
|
|
|
license = licenses.inria-icesl;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ mgttlinger ];
|
|
|
|
};
|
|
|
|
}
|