2017-03-21 17:31:08 +03:00
|
|
|
{ stdenv, fetchFromGitHub, python2, fetchurl }:
|
2016-02-14 14:56:07 +03:00
|
|
|
|
2016-10-06 11:05:54 +03:00
|
|
|
let
|
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
pythonPackages = python2.pkgs.override {
|
|
|
|
overrides = self: super: with self; {
|
2018-07-15 02:19:03 +03:00
|
|
|
backports_ssl_match_hostname = super.backports_ssl_match_hostname.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "3.4.0.2";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "07410e7fb09aab7bdaf5e618de66c3dac84e2e3d628352814dc4c37de321d6ae";
|
|
|
|
};
|
|
|
|
});
|
2016-10-06 11:05:54 +03:00
|
|
|
|
2018-06-23 13:20:32 +03:00
|
|
|
flask = super.flask.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "0.12.4";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "2ea22336f6d388b4b242bc3abf8a01244a8aa3e236e7407469ef78c16ba355dd";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
tornado = buildPythonPackage rec {
|
2018-06-23 13:20:32 +03:00
|
|
|
pname = "tornado";
|
2017-03-21 17:31:08 +03:00
|
|
|
version = "4.0.2";
|
2016-10-06 11:05:54 +03:00
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
propagatedBuildInputs = [ backports_ssl_match_hostname certifi ];
|
2016-10-06 11:05:54 +03:00
|
|
|
|
2018-06-23 13:20:32 +03:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-03-21 17:31:08 +03:00
|
|
|
sha256 = "1yhvn8i05lp3b1953majg48i8pqsyj45h34aiv59hrfvxcj5234h";
|
|
|
|
};
|
|
|
|
};
|
2016-10-06 11:05:54 +03:00
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
flask_login = buildPythonPackage rec {
|
2018-06-23 13:20:32 +03:00
|
|
|
pname = "Flask-Login";
|
2017-03-21 17:31:08 +03:00
|
|
|
version = "0.2.2";
|
2016-10-06 11:05:54 +03:00
|
|
|
|
2018-06-23 13:20:32 +03:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-03-21 17:31:08 +03:00
|
|
|
sha256 = "09ygn0r3i3jz065a5psng6bhlsqm78msnly4z6x39bs48r5ww17p";
|
|
|
|
};
|
2017-01-29 20:02:09 +03:00
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
propagatedBuildInputs = [ flask ];
|
2018-06-23 13:20:32 +03:00
|
|
|
checkInputs = [ nose ];
|
2017-01-29 20:02:09 +03:00
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
# No tests included
|
|
|
|
doCheck = false;
|
|
|
|
};
|
2017-01-29 20:02:09 +03:00
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
jinja2 = buildPythonPackage rec {
|
|
|
|
pname = "Jinja2";
|
|
|
|
version = "2.8.1";
|
2017-01-29 20:02:09 +03:00
|
|
|
|
2018-06-23 13:20:32 +03:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-03-21 17:31:08 +03:00
|
|
|
sha256 = "14aqmhkc9rw5w0v311jhixdm6ym8vsm29dhyxyrjfqxljwx1yd1m";
|
|
|
|
};
|
2017-01-29 20:02:09 +03:00
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
propagatedBuildInputs = [ markupsafe ];
|
2017-01-29 20:02:09 +03:00
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
# No tests included
|
|
|
|
doCheck = false;
|
|
|
|
};
|
|
|
|
};
|
2016-10-06 11:05:54 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
in pythonPackages.buildPythonApplication rec {
|
2018-06-23 13:20:32 +03:00
|
|
|
pname = "OctoPrint";
|
|
|
|
version = "1.3.8";
|
2016-02-14 14:56:07 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "foosel";
|
|
|
|
repo = "OctoPrint";
|
|
|
|
rev = version;
|
2018-06-23 13:20:32 +03:00
|
|
|
sha256 = "00zd5yrlihwfd3ly0mxibr77ffa8r8vkm6jhml2ml43dqb99caa3";
|
2016-02-14 14:56:07 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
# We need old Tornado
|
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
2017-05-07 13:55:45 +03:00
|
|
|
awesome-slugify flask_assets rsa requests pkginfo watchdog
|
2017-03-21 17:31:08 +03:00
|
|
|
semantic-version flask_principal werkzeug flaskbabel tornado
|
2016-08-13 03:02:34 +03:00
|
|
|
psutil pyserial flask_login netaddr markdown sockjs-tornado
|
2017-01-29 20:02:09 +03:00
|
|
|
pylru pyyaml sarge feedparser netifaces click websocket_client
|
2018-02-18 12:48:41 +03:00
|
|
|
scandir chainmap future dateutil futures wrapt monotonic emoji
|
2018-06-23 13:20:32 +03:00
|
|
|
frozendict
|
2016-02-14 14:56:07 +03:00
|
|
|
];
|
|
|
|
|
2018-06-23 13:20:32 +03:00
|
|
|
checkInputs = with pythonPackages; [ nose mock ddt ];
|
2017-03-21 17:31:08 +03:00
|
|
|
|
2016-08-13 03:02:34 +03:00
|
|
|
# Jailbreak dependencies.
|
2016-02-14 14:56:07 +03:00
|
|
|
postPatch = ''
|
|
|
|
sed -i \
|
2016-08-13 03:02:34 +03:00
|
|
|
-e 's,pkginfo>=[^"]*,pkginfo,g' \
|
|
|
|
-e 's,Flask-Principal>=[^"]*,Flask-Principal,g' \
|
2017-03-21 17:31:08 +03:00
|
|
|
-e 's,websocket-client>=[^"]*,websocket-client,g' \
|
|
|
|
-e 's,Click>=[^"]*,Click,g' \
|
2016-08-13 03:02:34 +03:00
|
|
|
-e 's,rsa>=[^"]*,rsa,g' \
|
2016-12-18 15:33:03 +03:00
|
|
|
-e 's,flask>=[^"]*,flask,g' \
|
2017-03-21 17:31:08 +03:00
|
|
|
-e 's,Flask-Babel>=[^"]*,Flask-Babel,g' \
|
|
|
|
-e 's,Flask-Assets>=[^"]*,Flask-Assets,g' \
|
|
|
|
-e 's,PyYAML>=[^"]*,PyYAML,g' \
|
2017-01-29 20:02:09 +03:00
|
|
|
-e 's,scandir>=[^"]*,scandir,g' \
|
2017-03-21 17:31:08 +03:00
|
|
|
-e 's,werkzeug>=[^"]*,werkzeug,g' \
|
2018-06-23 13:20:32 +03:00
|
|
|
-e 's,psutil==[^"]*,psutil,g' \
|
2017-03-21 17:31:08 +03:00
|
|
|
-e 's,requests>=[^"]*,requests,g' \
|
2017-07-27 15:51:12 +03:00
|
|
|
-e 's,future>=[^"]*,future,g' \
|
2017-09-29 10:19:35 +03:00
|
|
|
-e 's,pyserial>=[^"]*,pyserial,g' \
|
|
|
|
-e 's,semantic_version>=[^"]*,semantic_version,g' \
|
2017-11-17 11:16:36 +03:00
|
|
|
-e 's,wrapt>=[^"]*,wrapt,g' \
|
2018-04-06 18:00:27 +03:00
|
|
|
-e 's,python-dateutil>=[^"]*,python-dateutil,g' \
|
|
|
|
-e 's,emoji>=[^"]*,emoji,g' \
|
2018-04-06 23:43:13 +03:00
|
|
|
-e 's,futures>=[^"]*,futures,g' \
|
2016-02-14 14:56:07 +03:00
|
|
|
setup.py
|
|
|
|
'';
|
|
|
|
|
2017-03-21 17:31:08 +03:00
|
|
|
checkPhase = "nosetests";
|
|
|
|
|
2016-02-14 14:56:07 +03:00
|
|
|
meta = with stdenv.lib; {
|
2018-01-05 22:42:46 +03:00
|
|
|
homepage = https://octoprint.org/;
|
2016-02-14 14:56:07 +03:00
|
|
|
description = "The snappy web interface for your 3D printer";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|