nixpkgs/pkgs/applications/misc/octoprint/default.nix

84 lines
2.6 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, pythonPackages, fetchurl }:
2016-02-14 11:56:07 +00:00
let
tornado_4_0_1 = pythonPackages.buildPythonPackage rec {
name = "tornado-${version}";
version = "4.0.1";
propagatedBuildInputs = with pythonPackages; [ backports_ssl_match_hostname_3_4_0_2 certifi ];
src = fetchurl {
url = "mirror://pypi/t/tornado/${name}.tar.gz";
sha256 = "00crp5vnasxg7qyjv89qgssb69vd7qr13jfghdryrcbnn9l8c1df";
};
};
sockjs-tornado = pythonPackages.buildPythonPackage rec {
name = "sockjs-tornado-${version}";
version = "1.0.3";
src = fetchurl {
url = "mirror://pypi/s/sockjs-tornado/${name}.tar.gz";
sha256 = "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd";
};
# This is needed for compatibility with OctoPrint
propagatedBuildInputs = [ tornado_4_0_1 ];
meta = with stdenv.lib; {
description = "SockJS python server implementation on top of Tornado framework";
2016-11-23 14:49:18 +00:00
homepage = "http://github.com/mrjoes/sockjs-tornado/";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ abbradar ];
};
};
in pythonPackages.buildPythonApplication rec {
2016-02-14 11:56:07 +00:00
name = "OctoPrint-${version}";
2016-11-23 14:54:32 +00:00
version = "1.2.17";
2016-02-14 11:56:07 +00:00
src = fetchFromGitHub {
owner = "foosel";
repo = "OctoPrint";
rev = version;
2016-11-23 14:54:32 +00:00
sha256 = "1di2f5npwsfckx5p2fl23bl5zi75i0aksd9qy4sa3zmw672337fh";
2016-02-14 11:56:07 +00:00
};
# We need old Tornado
propagatedBuildInputs = with pythonPackages; [
2016-08-13 01:02:34 +01:00
awesome-slugify flask_assets rsa requests2 pkginfo watchdog
semantic-version flask_principal werkzeug flaskbabel tornado_4_0_1
psutil pyserial flask_login netaddr markdown sockjs-tornado
pylru pyyaml sarge feedparser netifaces
2016-02-14 11:56:07 +00:00
];
2016-08-13 01:02:34 +01:00
# Jailbreak dependencies.
# Currently broken for new: tornado, pyserial, flask_login
2016-02-14 11:56:07 +00:00
postPatch = ''
sed -i \
2016-08-13 01:02:34 +01:00
-e 's,werkzeug>=[^"]*,werkzeug,g' \
-e 's,requests>=[^"]*,requests,g' \
-e 's,pkginfo>=[^"]*,pkginfo,g' \
-e 's,semantic_version>=[^"]*,semantic_version,g' \
-e 's,psutil>=[^"]*,psutil,g' \
-e 's,Flask-Babel>=[^"]*,Flask-Babel,g' \
-e 's,Flask-Principal>=[^"]*,Flask-Principal,g' \
-e 's,markdown>=[^"]*,markdown,g' \
-e 's,Flask-Assets>=[^"]*,Flask-Assets,g' \
2016-11-23 14:54:32 +00:00
-e 's,Flask-Login>=[^"]*,Flask-Login,g' \
2016-08-13 01:02:34 +01:00
-e 's,rsa>=[^"]*,rsa,g' \
-e 's,PyYAML>=[^"]*,PyYAML,g' \
2016-12-18 12:33:03 +00:00
-e 's,flask>=[^"]*,flask,g' \
2016-02-14 11:56:07 +00:00
setup.py
'';
meta = with stdenv.lib; {
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 ];
};
}