2017-10-19 23:53:44 +01:00
|
|
|
{ fetchzip
|
|
|
|
, libX11
|
2018-02-24 13:12:44 +00:00
|
|
|
, libGLU_combined
|
2017-10-19 23:53:44 +01:00
|
|
|
, makeWrapper
|
|
|
|
, stdenv
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
libPath = stdenv.lib.makeLibraryPath [
|
2018-02-24 13:12:44 +00:00
|
|
|
libGLU_combined
|
2017-10-19 23:53:44 +01:00
|
|
|
stdenv.cc.cc
|
|
|
|
libX11
|
|
|
|
];
|
|
|
|
|
|
|
|
inidir = "\\\${XDG_CONFIG_HOME:-\\$HOME/.config}/kisslicer";
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-04-07 15:05:18 +01:00
|
|
|
name = "kisslicer-1.6.3";
|
2017-10-19 23:53:44 +01:00
|
|
|
|
|
|
|
src = fetchzip {
|
2019-04-07 15:05:18 +01:00
|
|
|
url = "http://www.kisslicer.com/uploads/1/5/3/8/15381852/kisslicer_linux64_1.6.3_release.zip";
|
|
|
|
sha256 = "1xmywj5jrcsqv1d5x3mphhvafs4mfm9l12npkhk7l03qxbwg9j82";
|
2017-10-19 23:53:44 +01:00
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
makeWrapper
|
2018-02-24 13:12:44 +00:00
|
|
|
libGLU_combined
|
2017-10-19 23:53:44 +01:00
|
|
|
libX11
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -p * $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
chmod 755 $out/bin/KISSlicer
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath ${libPath} $out/bin/KISSlicer
|
|
|
|
wrapProgram $out/bin/KISSlicer \
|
|
|
|
--add-flags "-inidir ${inidir}" \
|
|
|
|
--run "mkdir -p ${inidir}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Convert STL files into Gcode";
|
|
|
|
homepage = http://www.kisslicer.com;
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = [ maintainers.cransom ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|