2018-12-06 04:43:36 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, python2 }:
|
2016-02-14 11:56:07 +00:00
|
|
|
|
2016-10-06 09:05:54 +01:00
|
|
|
let
|
2018-12-06 04:43:36 +00:00
|
|
|
mkOverride = attrname: version: sha256:
|
|
|
|
self: super: {
|
|
|
|
${attrname} = super.${attrname}.overridePythonAttrs (oldAttrs: {
|
|
|
|
inherit version;
|
2018-08-30 21:14:06 +01:00
|
|
|
src = oldAttrs.src.override {
|
2018-12-06 04:43:36 +00:00
|
|
|
inherit version sha256;
|
2018-08-30 21:14:06 +01:00
|
|
|
};
|
|
|
|
});
|
2017-03-21 14:31:08 +00:00
|
|
|
};
|
2018-12-06 04:43:36 +00:00
|
|
|
|
|
|
|
py = python2.override {
|
|
|
|
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([
|
|
|
|
(mkOverride "flask" "0.10.1" "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc")
|
|
|
|
(mkOverride "flask_login" "0.2.11" "1rg3rsjs1gwi2pw6vr9jmhaqm9b3vc9c4hfcsvp4y8agbh7g3mc3")
|
|
|
|
(mkOverride "sarge" "0.1.4" "08s8896973bz1gg0pkr592w6g4p6v47bkfvws5i91p9xf8b35yar")
|
|
|
|
(mkOverride "tornado" "4.5.3" "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d")
|
2019-04-02 08:07:47 +01:00
|
|
|
|
2019-05-13 00:36:17 +01:00
|
|
|
# Octoprint holds back jinja2 to 2.8.1 due to breaking changes.
|
|
|
|
# This old version does not have updated test config for pytest 4,
|
|
|
|
# and pypi tarball doesn't contain tests dir anyways.
|
|
|
|
(pself: psuper: {
|
|
|
|
jinja2 = psuper.jinja2.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "2.8.1";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "14aqmhkc9rw5w0v311jhixdm6ym8vsm29dhyxyrjfqxljwx1yd1m";
|
|
|
|
};
|
|
|
|
doCheck = false;
|
|
|
|
});
|
|
|
|
})
|
2018-12-06 04:43:36 +00:00
|
|
|
]);
|
2016-10-06 09:05:54 +01:00
|
|
|
};
|
|
|
|
|
2018-12-06 04:43:36 +00:00
|
|
|
ignoreVersionConstraints = [
|
|
|
|
"Click"
|
|
|
|
"Flask-Assets"
|
|
|
|
"Flask-Babel"
|
|
|
|
"Flask-Principal"
|
|
|
|
"emoji"
|
|
|
|
"flask"
|
|
|
|
"future"
|
|
|
|
"futures"
|
2019-02-20 20:02:45 +00:00
|
|
|
"monotonic"
|
2019-05-30 14:28:25 +01:00
|
|
|
"markdown"
|
2018-12-06 04:43:36 +00:00
|
|
|
"pkginfo"
|
|
|
|
"psutil"
|
|
|
|
"pyserial"
|
|
|
|
"requests"
|
|
|
|
"rsa"
|
2019-02-20 20:02:45 +00:00
|
|
|
"sarge"
|
2018-12-06 04:43:36 +00:00
|
|
|
"scandir"
|
|
|
|
"semantic_version"
|
2019-02-20 20:02:45 +00:00
|
|
|
"watchdog"
|
2018-12-06 04:43:36 +00:00
|
|
|
"websocket-client"
|
|
|
|
"wrapt"
|
2019-05-30 14:28:25 +01:00
|
|
|
"sentry-sdk"
|
2018-12-06 04:43:36 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
in py.pkgs.buildPythonApplication rec {
|
2018-06-23 11:20:32 +01:00
|
|
|
pname = "OctoPrint";
|
2019-05-30 14:28:25 +01:00
|
|
|
version = "1.3.11";
|
2016-02-14 11:56:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-12-06 04:43:36 +00:00
|
|
|
owner = "foosel";
|
|
|
|
repo = "OctoPrint";
|
|
|
|
rev = version;
|
2019-05-30 14:28:25 +01:00
|
|
|
sha256 = "1102ki1819wsmkfg4riz4i0hjlr3w6nsvk8wrzqq0lc0s5ycf4jx";
|
2016-02-14 11:56:07 +00:00
|
|
|
};
|
|
|
|
|
2018-12-06 04:43:36 +00:00
|
|
|
propagatedBuildInputs = with py.pkgs; [
|
2017-05-07 11:55:45 +01: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 01:02:34 +01: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
|
2019-05-30 14:28:25 +01:00
|
|
|
scandir chainmap future futures wrapt monotonic emoji
|
|
|
|
frozendict cachelib sentry-sdk typing
|
2019-05-13 02:41:38 +01:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ];
|
2016-02-14 11:56:07 +00:00
|
|
|
|
2018-12-06 04:43:36 +00:00
|
|
|
checkInputs = with py.pkgs; [ nose mock ddt ];
|
2017-03-21 14:31:08 +00:00
|
|
|
|
2016-02-14 11:56:07 +00:00
|
|
|
postPatch = ''
|
2018-12-06 04:43:36 +00:00
|
|
|
sed -r -i \
|
|
|
|
${lib.concatStringsSep "\n" (map (e:
|
|
|
|
''-e 's@${e}[<>=]+.*@${e}",@g' \''
|
|
|
|
) ignoreVersionConstraints)}
|
2016-02-14 11:56:07 +00:00
|
|
|
setup.py
|
|
|
|
'';
|
|
|
|
|
2019-02-20 20:09:17 +00:00
|
|
|
checkPhase = ''
|
2019-05-13 02:41:38 +01:00
|
|
|
HOME=$(mktemp -d) nosetests ${lib.optionalString stdenv.isDarwin "--exclude=test_set_external_modification"}
|
2019-02-20 20:09:17 +00:00
|
|
|
'';
|
2017-03-21 14:31:08 +00:00
|
|
|
|
2016-02-14 11:56:07 +00:00
|
|
|
meta = with stdenv.lib; {
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = https://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 ];
|
|
|
|
};
|
|
|
|
}
|