1 { stdenv, lib, fetchzip, freeglut, libXmu, libXi, libX11, libICE, libGLU, libGL, libSM
2 , libXext, glibc, lua, luabind, glfw, libgccjit, dialog, makeWrapper
5 lpath = lib.makeLibraryPath [ libXmu libXi libX11 freeglut libICE libGLU libGL libSM libXext glibc lua glfw luabind libgccjit ];
7 stdenv.mkDerivation rec {
11 src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip {
12 url = "https://icesl.loria.fr/assets/other/download.php?build=${version}&os=amd64";
14 sha256 = "0rrnkqkhlsjclif5cjbf17qz64vs95ja49xarxjvq54wb4jhbs4l";
15 } else if stdenv.hostPlatform.system == "i686-linux" then fetchzip {
16 url = "https://icesl.loria.fr/assets/other/download.php?build=${version}&os=i386";
18 sha256 = "0n2yyxzw0arkc70f0qli4n5chdlh9vc7aqizk4v7825mcglhwlyh";
19 } else throw "Unsupported architecture";
21 nativeBuildInputs = [ makeWrapper ];
26 mv $out/bin/IceSL-slicer $out/oldbin/IceSL-slicer
31 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
32 --set-rpath "${lpath}" \
33 $out/oldbin/IceSL-slicer
34 makeWrapper $out/oldbin/IceSL-slicer $out/bin/icesl --prefix PATH : ${dialog}/bin
38 description = "GPU-accelerated procedural modeler and slicer for 3D printing";
39 homepage = "https://icesl.loria.fr/";
40 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
41 license = licenses.inria-icesl;
42 platforms = [ "i686-linux" "x86_64-linux" ];
43 maintainers = with maintainers; [ mgttlinger ];