curaByDagoma: use python2

This commit is contained in:
Frederik Rietdijk 2021-03-25 11:58:47 +01:00
parent 5769fcd519
commit d083017838

View file

@ -1,4 +1,4 @@
{ stdenv, runtimeShell, lib, fetchurl, python, pythonPackages, unzip }:
{ stdenv, runtimeShell, lib, fetchurl, python2Packages, unzip }:
# This package uses a precompiled "binary" distribution of CuraByDagoma,
# distributed by the editor.
@ -13,7 +13,9 @@
# I guess people owning a 3D printer generally don't use i686.
# If, however, someone needs it, we certainly can find a solution.
stdenv.mkDerivation rec {
let
pythonPackages = python2Packages;
in stdenv.mkDerivation rec {
pname = "curabydagoma";
# Version is the date, UNIX format
version = "1520506579";
@ -26,7 +28,7 @@ stdenv.mkDerivation rec {
};
unpackCmd = "unzip $curSrc && tar zxf CuraByDagoma_amd64.tar.gz";
nativeBuildInputs = [ unzip ];
buildInputs = [ python pythonPackages.pyopengl pythonPackages.wxPython pythonPackages.pyserial pythonPackages.numpy ];
buildInputs = [ pythonPackages.python pythonPackages.pyopengl pythonPackages.wxPython pythonPackages.pyserial pythonPackages.numpy ];
# Compile all pyc files because the included pyc files may be older than the
# py files. However, Python doesn't realize that because the packages
@ -46,7 +48,7 @@ stdenv.mkDerivation rec {
cat > $out/bin/curabydago <<EOF
#!${runtimeShell}
export PYTHONPATH=$PYTHONPATH
${python.out}/bin/python $out/curabydago/cura.py
${pythonPackages.python.interpreter} $out/curabydago/cura.py
EOF
chmod a+x $out/bin/curabydago