2021-10-28 06:52:43 +00:00
|
|
|
{ stdenv, lib, fetchzip, freeglut, libXmu, libXi, libX11, libICE, libGLU, libGL, libSM
|
|
|
|
, libXext, glibc, lua, luabind, glfw, libgccjit, dialog, makeWrapper
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
2021-10-28 06:52:43 +00:00
|
|
|
lpath = lib.makeLibraryPath [ libXmu libXi libX11 freeglut libICE libGLU libGL libSM libXext glibc lua glfw luabind libgccjit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "iceSL";
|
2021-10-28 06:52:43 +00:00
|
|
|
version = "2.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchzip {
|
2021-10-28 06:52:43 +00:00
|
|
|
url = "https://icesl.loria.fr/assets/other/download.php?build=${version}&os=amd64";
|
|
|
|
extension = "zip";
|
|
|
|
sha256 = "0rrnkqkhlsjclif5cjbf17qz64vs95ja49xarxjvq54wb4jhbs4l";
|
2020-04-24 23:36:52 +00:00
|
|
|
} else if stdenv.hostPlatform.system == "i686-linux" then fetchzip {
|
2021-10-28 06:52:43 +00:00
|
|
|
url = "https://icesl.loria.fr/assets/other/download.php?build=${version}&os=i386";
|
|
|
|
extension = "zip";
|
|
|
|
sha256 = "0n2yyxzw0arkc70f0qli4n5chdlh9vc7aqizk4v7825mcglhwlyh";
|
2020-04-24 23:36:52 +00:00
|
|
|
} else throw "Unsupported architecture";
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
cp -r ./ $out
|
2021-10-28 06:52:43 +00:00
|
|
|
rm $out/bin/*.so
|
2020-04-24 23:36:52 +00:00
|
|
|
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-11-03 02:18:15 +00:00
|
|
|
description = "GPU-accelerated procedural modeler and slicer for 3D printing";
|
2021-10-28 06:52:43 +00:00
|
|
|
homepage = "https://icesl.loria.fr/";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.inria-icesl;
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ mgttlinger ];
|
|
|
|
};
|
|
|
|
}
|