2017-03-21 14:31:08 +00:00
|
|
|
{ stdenv, fetchFromGitHub, python2, fetchurl }:
|
2016-02-14 11:56:07 +00:00
|
|
|
|
2016-10-06 08:05:54 +00:00
|
|
|
let
|
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
pythonPackages = python2.pkgs.override {
|
|
|
|
overrides = self: super: with self; {
|
|
|
|
backports_ssl_match_hostname = self.backports_ssl_match_hostname_3_4_0_2;
|
2016-10-06 08:05:54 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
tornado = buildPythonPackage rec {
|
|
|
|
name = "tornado-${version}";
|
|
|
|
version = "4.0.2";
|
2016-10-06 08:05:54 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
propagatedBuildInputs = [ backports_ssl_match_hostname certifi ];
|
2016-10-06 08:05:54 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://pypi/t/tornado/${name}.tar.gz";
|
|
|
|
sha256 = "1yhvn8i05lp3b1953majg48i8pqsyj45h34aiv59hrfvxcj5234h";
|
|
|
|
};
|
|
|
|
};
|
2016-10-06 08:05:54 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
flask_login = buildPythonPackage rec {
|
|
|
|
name = "Flask-Login-${version}";
|
|
|
|
version = "0.2.2";
|
2016-10-06 08:05:54 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://pypi/F/Flask-Login/${name}.tar.gz";
|
|
|
|
sha256 = "09ygn0r3i3jz065a5psng6bhlsqm78msnly4z6x39bs48r5ww17p";
|
|
|
|
};
|
2017-01-29 17:02:09 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
propagatedBuildInputs = [ flask ];
|
|
|
|
buildInputs = [ nose ];
|
2017-01-29 17:02:09 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
# No tests included
|
|
|
|
doCheck = false;
|
|
|
|
};
|
2017-01-29 17:02:09 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
jinja2 = buildPythonPackage rec {
|
|
|
|
pname = "Jinja2";
|
|
|
|
version = "2.8.1";
|
|
|
|
name = "${pname}-${version}";
|
2017-01-29 17:02:09 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://pypi/J/Jinja2/${name}.tar.gz";
|
|
|
|
sha256 = "14aqmhkc9rw5w0v311jhixdm6ym8vsm29dhyxyrjfqxljwx1yd1m";
|
|
|
|
};
|
2017-01-29 17:02:09 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
propagatedBuildInputs = [ markupsafe ];
|
2017-01-29 17:02:09 +00:00
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
# No tests included
|
|
|
|
doCheck = false;
|
|
|
|
};
|
|
|
|
};
|
2016-10-06 08:05:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in pythonPackages.buildPythonApplication rec {
|
2016-02-14 11:56:07 +00:00
|
|
|
name = "OctoPrint-${version}";
|
2017-03-21 14:31:08 +00:00
|
|
|
version = "1.3.2";
|
2016-02-14 11:56:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "foosel";
|
|
|
|
repo = "OctoPrint";
|
|
|
|
rev = version;
|
2017-03-21 14:31:08 +00:00
|
|
|
sha256 = "0wyrxi754xa111b88fqvaw2s5ib2a925dlrgym5mn93i027m50wk";
|
2016-02-14 11:56:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# We need old Tornado
|
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
2017-05-07 10:55:45 +00:00
|
|
|
awesome-slugify flask_assets rsa requests pkginfo watchdog
|
2017-03-21 14:31:08 +00:00
|
|
|
semantic-version flask_principal werkzeug flaskbabel tornado
|
2016-08-13 00:02:34 +00:00
|
|
|
psutil pyserial flask_login netaddr markdown sockjs-tornado
|
2017-01-29 17:02:09 +00:00
|
|
|
pylru pyyaml sarge feedparser netifaces click websocket_client
|
|
|
|
scandir chainmap future
|
2016-02-14 11:56:07 +00:00
|
|
|
];
|
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
buildInputs = with pythonPackages; [ nose mock ddt ];
|
|
|
|
|
2016-08-13 00:02:34 +00:00
|
|
|
# Jailbreak dependencies.
|
2016-02-14 11:56:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i \
|
2016-08-13 00:02:34 +00:00
|
|
|
-e 's,pkginfo>=[^"]*,pkginfo,g' \
|
|
|
|
-e 's,Flask-Principal>=[^"]*,Flask-Principal,g' \
|
2017-03-21 14:31:08 +00:00
|
|
|
-e 's,websocket-client>=[^"]*,websocket-client,g' \
|
|
|
|
-e 's,Click>=[^"]*,Click,g' \
|
2016-08-13 00:02:34 +00:00
|
|
|
-e 's,rsa>=[^"]*,rsa,g' \
|
2016-12-18 12:33:03 +00:00
|
|
|
-e 's,flask>=[^"]*,flask,g' \
|
2017-03-21 14:31:08 +00:00
|
|
|
-e 's,Flask-Babel>=[^"]*,Flask-Babel,g' \
|
|
|
|
-e 's,Flask-Assets>=[^"]*,Flask-Assets,g' \
|
|
|
|
-e 's,PyYAML>=[^"]*,PyYAML,g' \
|
2017-01-29 17:02:09 +00:00
|
|
|
-e 's,scandir>=[^"]*,scandir,g' \
|
2017-03-21 14:31:08 +00:00
|
|
|
-e 's,werkzeug>=[^"]*,werkzeug,g' \
|
|
|
|
-e 's,psutil>=[^"]*,psutil,g' \
|
|
|
|
-e 's,requests>=[^"]*,requests,g' \
|
2016-02-14 11:56:07 +00:00
|
|
|
setup.py
|
|
|
|
'';
|
|
|
|
|
2017-03-21 14:31:08 +00:00
|
|
|
checkPhase = "nosetests";
|
|
|
|
|
2016-02-14 11:56:07 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-04-29 23:58:00 +00:00
|
|
|
homepage = "http://octoprint.org/";
|
2016-02-14 11:56:07 +00:00
|
|
|
description = "The snappy web interface for your 3D printer";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|