nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 66 lines 1.3 kB view raw
1{ 2 fetchzip, 3 libX11, 4 libGLU, 5 libGL, 6 makeWrapper, 7 lib, 8 stdenv, 9}: 10 11let 12 13 libPath = lib.makeLibraryPath [ 14 libGLU 15 libGL 16 stdenv.cc.cc 17 libX11 18 ]; 19 20 inidir = "\\\${XDG_CONFIG_HOME:-\\$HOME/.config}/kisslicer"; 21 22in 23 24stdenv.mkDerivation rec { 25 pname = "kisslicer"; 26 version = "1.6.3"; 27 28 src = fetchzip { 29 url = "https://www.kisslicer.com/uploads/1/5/3/8/15381852/kisslicer_linux64_${version}_release.zip"; 30 sha256 = "1xmywj5jrcsqv1d5x3mphhvafs4mfm9l12npkhk7l03qxbwg9j82"; 31 stripRoot = false; 32 }; 33 34 nativeBuildInputs = [ 35 makeWrapper 36 ]; 37 38 buildInputs = [ 39 libGLU 40 libGL 41 libX11 42 ]; 43 44 installPhase = '' 45 mkdir -p $out/bin 46 cp -p * $out/bin 47 ''; 48 49 fixupPhase = '' 50 chmod 755 $out/bin/KISSlicer 51 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 52 --set-rpath ${libPath} $out/bin/KISSlicer 53 wrapProgram $out/bin/KISSlicer \ 54 --add-flags "-inidir ${inidir}" \ 55 --run "mkdir -p ${inidir}" 56 ''; 57 58 meta = with lib; { 59 description = "Convert STL files into Gcode"; 60 homepage = "http://www.kisslicer.com"; 61 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 62 license = licenses.unfree; 63 maintainers = [ maintainers.cransom ]; 64 platforms = [ "x86_64-linux" ]; 65 }; 66}