git.iko.soy/typeable/nixpkgs
on master help sign in
inginious: turn lib into a python app.
commita48796ab831f564cd83fff2a3ce6e46114a6cb80 authorGuillaume Maudoux <layus.on@gmail.com> dateThu 9 Jun 2016, 02:18 (10 years ago) parent624602e
3 files changed+73−64
pkgs/servers/inginious/default.nix+71 pkgs/top-level/all-packages.nix+2 pkgs/top-level/python-packages.nix−64
pkgs/servers/inginious/default.nixnew file+71
@@ -0,0 +1,71 @@
1+{ pkgs, lib, pythonPackages }:
2+with lib;
3+
4+let
5+ docker_1_7_2 = pythonPackages.docker.override rec {
6+ name = "docker-py-1.7.2";
7+
8+ src = pkgs.fetchurl {
9+ url = "mirror://pypi/d/docker-py/${name}.tar.gz";
10+ sha256 = "0k6hm3vmqh1d3wr9rryyif5n4rzvcffdlb1k4jvzp7g4996d3ccm";
11+ };
12+ };
13+
14+ webpy-custom = pythonPackages.web.override {
15+ name = "web.py-INGI";
16+ src = pkgs.fetchFromGitHub {
17+ owner = "UCL-INGI";
18+ repo = "webpy-INGI";
19+ # tip of branch "ingi"
20+ rev = "f487e78d65d6569eb70003e588d5c6ace54c384f";
21+ sha256 = "159vwmb8554xk98rw380p3ah170r6gm861r1nqf2l452vvdfxscd";
22+ };
23+ };
24+
25+in pythonPackages.buildPythonApplication rec {
26+ version = "0.3a2.dev0";
27+ name = "inginious-${version}";
28+
29+ disabled = pythonPackages.isPy3k;
30+
31+ patchPhase = ''
32+ # transient failures
33+ substituteInPlace inginious/backend/tests/TestRemoteAgent.py \
34+ --replace "test_update_task_directory" "noop"
35+ '';
36+
37+ propagatedBuildInputs = with pythonPackages; [
38+ requests2
39+ cgroup-utils docker_1_7_2 docutils lti mock pygments
40+ pymongo pyyaml rpyc sh simpleldap sphinx_rtd_theme tidylib
41+ websocket_client watchdog webpy-custom flup
42+ ];
43+
44+ buildInputs = with pythonPackages; [ nose selenium virtual-display ];
45+
46+ /* Hydra fix exists only on github for now.
47+ src = pkgs.fetchurl {
48+ url = "mirror://pypi/I/INGInious/INGInious-${version}.tar.gz";
49+ };
50+ */
51+ src = pkgs.fetchFromGitHub {
52+ owner = "UCL-INGI";
53+ repo = "INGInious";
54+ rev = "07d111c0a3045c7cc4e464d4adb8aa28b75a6948";
55+ sha256 = "0kldbkc9yw1mgg5w5q5v8k2hz089c5c4rvxb5xhbagkzgm2gn230";
56+ };
57+
58+ # Only patch shebangs in /bin, other scripts are run within docker
59+ # containers and will fail if patched.
60+ dontPatchShebangs = true;
61+ preFixup = ''
62+ patchShebangs $prefix/bin
63+ '';
64+
65+ meta = {
66+ description = "An intelligent grader that allows secured and automated testing of code made by students";
67+ homepage = "https://github.com/UCL-INGI/INGInious";
68+ license = licenses.agpl3;
69+ maintainers = with maintainers; [ layus ];
70+ };
71+}
pkgs/top-level/all-packages.nix+2
@@ -13094,6 +13094,8 @@ in
1309413094
1309513095 inferno = callPackage_i686 ../applications/inferno { };
1309613096
13097+ inginious = callPackage ../servers/inginious {};
13098+
1309713099 inkscape = callPackage ../applications/graphics/inkscape {
1309813100 inherit (pythonPackages) python pyxml lxml numpy;
1309913101 lcms = lcms2;
pkgs/top-level/python-packages.nix−64
@@ -11084,70 +11084,6 @@ in modules // {
1108411084 };
1108511085 };
1108611086
11087− inginious = let
11088− # patched version of docker bindings.
11089− docker-custom = self.docker.override {
11090− name = "docker-1.3.0-dirty";
11091− src = pkgs.fetchFromGitHub {
11092− owner = "GuillaumeDerval";
11093− repo = "docker-py";
11094− # tip of branch "master"
11095− rev = "966becd0af514e67de5afbf885257a5005e49626";
11096− sha256 = "09k41dh86cbb7z4b8926fi5b2qq670mm6agl5py3giacakrap66c";
11097− };
11098− };
11099−
11100− webpy-custom = self.web.override {
11101− name = "web.py-INGI";
11102− src = pkgs.fetchFromGitHub {
11103− owner = "UCL-INGI";
11104− repo = "webpy-INGI";
11105− # tip of branch "ingi"
11106− rev = "f487e78d65d6569eb70003e588d5c6ace54c384f";
11107− sha256 = "159vwmb8554xk98rw380p3ah170r6gm861r1nqf2l452vvdfxscd";
11108− };
11109− };
11110− in buildPythonPackage rec {
11111− version = "0.3a2.dev0";
11112− name = "inginious-${version}";
11113−
11114− disabled = isPy3k;
11115−
11116− patchPhase = ''
11117− # transient failures
11118− substituteInPlace inginious/backend/tests/TestRemoteAgent.py \
11119− --replace "test_update_task_directory" "noop"
11120− '';
11121−
11122− propagatedBuildInputs = with self; [
11123− requests2
11124− cgroup-utils docker-custom docutils lti mock pygments
11125− pymongo pyyaml rpyc sh simpleldap sphinx_rtd_theme tidylib
11126− websocket_client watchdog webpy-custom
11127− ];
11128−
11129− buildInputs = with self; [ nose selenium virtual-display ];
11130−
11131− /* Hydra fix exists only on github for now.
11132− src = pkgs.fetchurl {
11133− url = "mirror://pypi/I/INGInious/INGInious-${version}.tar.gz";
11134− md5 = "40474dd6b6d4fc26e47a1d9c77bcf943";
11135− };
11136− */
11137− src = pkgs.fetchFromGitHub {
11138− owner = "UCL-INGI";
11139− repo = "INGInious";
11140− rev = "e019a0e28c442b4201ec4a0be2a816c4ab639683";
11141− sha256 = "1pwbm7f7xn50rxzwrqpji58n2ami5r3lgbdpb61q0w3dwkxvvvfk";
11142− };
11143−
11144− meta = {
11145− description = "An intelligent grader that allows secured and automated testing of code made by students";
11146− homepage = "https://github.com/UCL-INGI/INGInious";
11147− license = licenses.agpl3;
11148− maintainers = with maintainers; [ layus ];
11149− };
11150− };
1115111087
1115211088 interruptingcow = buildPythonPackage rec {
1115311089 name = "interruptingcow-${version}";