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

87 lines
2.4 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, python2 }:
2016-02-14 11:56:07 +00:00
let
mkOverride = attrname: version: sha256:
self: super: {
${attrname} = super.${attrname}.overridePythonAttrs (oldAttrs: {
inherit version;
2018-08-30 20:14:06 +00:00
src = oldAttrs.src.override {
inherit version sha256;
2018-08-30 20:14:06 +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 "jinja2" "2.8.1" "14aqmhkc9rw5w0v311jhixdm6ym8vsm29dhyxyrjfqxljwx1yd1m")
(mkOverride "pylru" "1.0.9" "0b0pq0l7xv83dfsajsc49jcxzc99kb9jfx1a1dlx22hzcy962dvi")
(mkOverride "sarge" "0.1.4" "08s8896973bz1gg0pkr592w6g4p6v47bkfvws5i91p9xf8b35yar")
(mkOverride "tornado" "4.5.3" "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d")
]);
};
ignoreVersionConstraints = [
"Click"
"Flask-Assets"
"Flask-Babel"
"Flask-Principal"
"PyYAML"
"emoji"
"flask"
"future"
"futures"
"pkginfo"
"psutil"
"pyserial"
"python-dateutil"
"requests"
"rsa"
"scandir"
"semantic_version"
"websocket-client"
"werkzeug"
"wrapt"
];
in py.pkgs.buildPythonApplication rec {
2018-06-23 10:20:32 +00:00
pname = "OctoPrint";
version = "1.3.9";
2016-02-14 11:56:07 +00:00
src = fetchFromGitHub {
owner = "foosel";
repo = "OctoPrint";
rev = version;
sha256 = "1yqbsfmkx4wiykjrh66a05lhn15qhpc9ay67l37kv8bhdqf2xkj4";
2016-02-14 11:56:07 +00:00
};
propagatedBuildInputs = with py.pkgs; [
awesome-slugify flask_assets rsa requests pkginfo watchdog
semantic-version flask_principal werkzeug flaskbabel tornado
2016-08-13 00:02:34 +00:00
psutil pyserial flask_login netaddr markdown sockjs-tornado
pylru pyyaml sarge feedparser netifaces click websocket_client
2018-02-18 09:48:41 +00:00
scandir chainmap future dateutil futures wrapt monotonic emoji
2018-06-23 10:20:32 +00:00
frozendict
2016-02-14 11:56:07 +00:00
];
checkInputs = with py.pkgs; [ nose mock ddt ];
2016-02-14 11:56:07 +00:00
postPatch = ''
sed -r -i \
${lib.concatStringsSep "\n" (map (e:
''-e 's@${e}[<>=]+.*@${e}",@g' \''
) ignoreVersionConstraints)}
2016-02-14 11:56:07 +00:00
setup.py
'';
checkPhase = "nosetests";
2016-02-14 11:56:07 +00:00
meta = with stdenv.lib; {
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 ];
};
}