diff options
author | Peter Jones <pjones@pmade.com> | 2015-08-31 14:42:05 -0600 |
---|---|---|
committer | Peter Jones <pjones@pmade.com> | 2015-08-31 14:42:05 -0600 |
commit | 674d0a79924e21e0d04a98eb45c0b4e45f64b0a3 (patch) | |
tree | 8bcdd9a6e21b54b3717a89443a23c5774b352e62 /pkgs/applications/misc/cura | |
parent | 6a02e7201c81167dcf7518ee898385c01c6acd43 (diff) | |
download | nixpkgs-674d0a79924e21e0d04a98eb45c0b4e45f64b0a3.tar nixpkgs-674d0a79924e21e0d04a98eb45c0b4e45f64b0a3.tar.gz nixpkgs-674d0a79924e21e0d04a98eb45c0b4e45f64b0a3.tar.bz2 nixpkgs-674d0a79924e21e0d04a98eb45c0b4e45f64b0a3.tar.lz nixpkgs-674d0a79924e21e0d04a98eb45c0b4e45f64b0a3.tar.xz nixpkgs-674d0a79924e21e0d04a98eb45c0b4e45f64b0a3.tar.zst nixpkgs-674d0a79924e21e0d04a98eb45c0b4e45f64b0a3.zip |
curaLulzbot: init at 15.02.1-1.03-5064
Diffstat (limited to 'pkgs/applications/misc/cura')
-rw-r--r-- | pkgs/applications/misc/cura/lulzbot.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/applications/misc/cura/lulzbot.nix b/pkgs/applications/misc/cura/lulzbot.nix new file mode 100644 index 00000000000..4d13e62bdfe --- /dev/null +++ b/pkgs/applications/misc/cura/lulzbot.nix @@ -0,0 +1,58 @@ +{ stdenv, fetchurl, dpkg, bash, python27Packages }: + +let + py = python27Packages; +in +stdenv.mkDerivation rec { + name = "cura-lulzbot"; + version = "15.02.1-1.03-5064"; + + src = + if stdenv.system == "x86_64-linux" then + fetchurl { + url = "http://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-amd64/cura_${version}_amd64.deb"; + sha256 = "1gsfidg3gim5pjbl82vkh0cw4ya253m4p7nirm8nr6yjrsirkzxg"; + } + else if stdenv.system == "i686-linux" then + fetchurl { + url = "http://download.alephobjects.com/ao/aodeb/dists/jessie/main/binary-i386/cura_${version}_i386.deb"; + sha256 = "0xd3df6bxq4rijgvsqvps454jkc1nzhxbdzzj6j2w317ppsbhyc1"; + } + else throw "${name} is not supported on ${stdenv.system}"; + + python_deps = with py; [ pyopengl pyserial numpy wxPython30 power setuptools ]; + pythonPath = python_deps; + propagatedBuildInputs = python_deps; + buildInputs = [ dpkg bash py.wrapPython ]; + + phases = [ "unpackPhase" "installPhase" ]; + unpackPhase = "dpkg-deb -x ${src} ./"; + + installPhase = '' + mkdir -p $out/bin + cp -r usr/share $out/share + find $out/share -type f -exec sed -i 's|/usr/share/cura|$out/share/cura|g' "{}" \; + + cat <<EOT > $out/bin/cura + #!${bash}/bin/bash + PYTHONPATH=$PYTHONPATH:$out/share/cura ${py.python}/bin/python $out/share/cura/cura.py "\$@" + EOT + + chmod 555 $out/bin/cura + ''; + + meta = with stdenv.lib; { + description = "3D printing host software for the Lulzbot"; + + longDescription = '' + Cura LulzBot Edition is a fork of the 3D printing/slicing + software from Ultimaker, with changes to support 3D printers + from Aleph Objects. + ''; + + homepage = https://www.lulzbot.com/cura/; + license = licenses.agpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ pjones ]; + }; +} |