nixpkgs-suyu/pkgs/tools/misc/kisslicer/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.2 KiB
Nix
Raw Normal View History

2017-10-20 00:53:44 +02:00
{ fetchzip
, libX11
2019-11-10 17:44:34 +01:00
, libGLU, libGL
2017-10-20 00:53:44 +02:00
, makeWrapper
, lib, stdenv
2017-10-20 00:53:44 +02:00
}:
let
2021-01-15 10:19:50 +01:00
libPath = lib.makeLibraryPath [
2019-11-10 17:44:34 +01:00
libGLU libGL
2017-10-20 00:53:44 +02:00
stdenv.cc.cc
libX11
];
inidir = "\\\${XDG_CONFIG_HOME:-\\$HOME/.config}/kisslicer";
in
stdenv.mkDerivation rec {
pname = "kisslicer";
version = "1.6.3";
2017-10-20 00:53:44 +02:00
src = fetchzip {
url = "https://www.kisslicer.com/uploads/1/5/3/8/15381852/kisslicer_linux64_${version}_release.zip";
sha256 = "1xmywj5jrcsqv1d5x3mphhvafs4mfm9l12npkhk7l03qxbwg9j82";
2017-10-20 00:53:44 +02:00
stripRoot = false;
};
nativeBuildInputs = [
2017-10-20 00:53:44 +02:00
makeWrapper
];
buildInputs = [
2019-11-10 17:44:34 +01:00
libGLU libGL
2017-10-20 00:53:44 +02: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 lib; {
2017-10-20 00:53:44 +02:00
description = "Convert STL files into Gcode";
homepage = "http://www.kisslicer.com";
2017-10-20 00:53:44 +02:00
license = licenses.unfree;
maintainers = [ maintainers.cransom ];
platforms = [ "x86_64-linux" ];
};
}