curaByDagoma: init at 1520506579 (#38075)

Allow NixOS users and Dagoma 3D printer owners to slice 3D images for
their printer

authored by Sébastien Maccagnoni and committed by zimbatm.tngl.sh 4e6b166b 70ddb32c

+78
+76
pkgs/applications/misc/curabydagoma/default.nix
··· 1 + { stdenv, lib, fetchurl, python, pythonPackages, unzip }: 2 + 3 + # This package uses a precompiled "binary" distribution of CuraByDagoma, 4 + # distributed by the editor. 5 + # 6 + # To update the package, follow the links on https://dist.dagoma.fr/: 7 + # * Cura By Dagoma 8 + # * Linux 9 + # * 64 bits 10 + # * Genric archive 11 + # 12 + # I made the arbitrary choice to compile this package only for x86_64. 13 + # I guess people owning a 3D printer generally don't use i686. 14 + # If, however, someone needs it, we certainly can find a solution. 15 + 16 + stdenv.mkDerivation rec { 17 + name = "curabydagoma-${version}"; 18 + # Version is the date, UNIX format 19 + version = "1520506579"; 20 + # Hash of the user's choice: os, arch, package type... 21 + hash = "58228cce5bbdcf764b7116850956f1e5"; 22 + 23 + src = fetchurl { 24 + url = "https://dist.dagoma.fr/get/zip/CuraByDagoma/${version}/${hash}"; 25 + sha256 = "16wfipdyjkf6dq8awjzs4zgkmqk6230277mf3iz8swday9hns8pq"; 26 + }; 27 + unpackCmd = "unzip $curSrc && tar zxf CuraByDagoma_amd64.tar.gz"; 28 + nativeBuildInputs = [ unzip ]; 29 + buildInputs = [ python pythonPackages.pyopengl pythonPackages.wxPython pythonPackages.pyserial pythonPackages.numpy ]; 30 + 31 + # Compile all pyc files because the included pyc files may be older than the 32 + # py files. However, Python doesn't realize that because the packages 33 + # have all dates set to epoch. 34 + buildPhase = '' 35 + python -m compileall -f curabydago 36 + ''; 37 + 38 + # * Simply copy the stuff there 39 + # * Create an executable with the correct path etc 40 + # * Create a .desktop file to have a launcher in the desktop environments 41 + installPhase = '' 42 + mkdir $out 43 + cp -r * $out/ 44 + 45 + mkdir $out/bin 46 + cat > $out/bin/curabydago <<EOF 47 + #!/bin/sh 48 + export PYTHONPATH=$PYTHONPATH 49 + ${python.out}/bin/python $out/curabydago/cura.py 50 + EOF 51 + chmod a+x $out/bin/curabydago 52 + 53 + mkdir -p $out/share/applications 54 + cat > $out/share/applications/curabydago.desktop <<EOF 55 + [Desktop Entry] 56 + Type=Application 57 + Name=Cura-by-dagoma 58 + Comment=CuraByDagoma is a fork of Legacy Cura made by Dagoma for its own printers. 59 + Icon=$out/curabydago/resources/images/cura.ico 60 + Exec=$out/bin/curabydago 61 + Path=$out/ 62 + StartupNotify=true 63 + Terminal=false 64 + Categories=GNOME;GTK;Utility; 65 + EOF 66 + 67 + ''; 68 + 69 + meta = with lib; { 70 + description = "Slicer for 3D printers built by Dagoma"; 71 + homepage = https://dagoma.fr/cura-by-dagoma.html; 72 + license = licenses.agpl3; 73 + platforms = [ "x86_64-linux" ]; 74 + maintainers = with maintainers; [ tiramiseb ]; 75 + }; 76 + }
+2
pkgs/top-level/all-packages.nix
··· 17749 17749 17750 17750 curaLulzbot = callPackage ../applications/misc/cura/lulzbot.nix { }; 17751 17751 17752 + curaByDagoma = callPackage ../applications/misc/curabydagoma { }; 17753 + 17752 17754 peru = callPackage ../applications/version-management/peru {}; 17753 17755 17754 17756 pmidi = callPackage ../applications/audio/pmidi { };