diff options
-rw-r--r-- | pkgs/servers/inginious/default.nix | 71 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 64 |
3 files changed, 73 insertions, 64 deletions
diff --git a/pkgs/servers/inginious/default.nix b/pkgs/servers/inginious/default.nix new file mode 100644 index 000000000000..ba6a54fc973d --- /dev/null +++ b/pkgs/servers/inginious/default.nix @@ -0,0 +1,71 @@ +{ pkgs, lib, pythonPackages }: +with lib; + +let + docker_1_7_2 = pythonPackages.docker.override rec { + name = "docker-py-1.7.2"; + + src = pkgs.fetchurl { + url = "mirror://pypi/d/docker-py/${name}.tar.gz"; + sha256 = "0k6hm3vmqh1d3wr9rryyif5n4rzvcffdlb1k4jvzp7g4996d3ccm"; + }; + }; + + webpy-custom = pythonPackages.web.override { + name = "web.py-INGI"; + src = pkgs.fetchFromGitHub { + owner = "UCL-INGI"; + repo = "webpy-INGI"; + # tip of branch "ingi" + rev = "f487e78d65d6569eb70003e588d5c6ace54c384f"; + sha256 = "159vwmb8554xk98rw380p3ah170r6gm861r1nqf2l452vvdfxscd"; + }; + }; + +in pythonPackages.buildPythonApplication rec { + version = "0.3a2.dev0"; + name = "inginious-${version}"; + + disabled = pythonPackages.isPy3k; + + patchPhase = '' + # transient failures + substituteInPlace inginious/backend/tests/TestRemoteAgent.py \ + --replace "test_update_task_directory" "noop" + ''; + + propagatedBuildInputs = with pythonPackages; [ + requests2 + cgroup-utils docker_1_7_2 docutils lti mock pygments + pymongo pyyaml rpyc sh simpleldap sphinx_rtd_theme tidylib + websocket_client watchdog webpy-custom flup + ]; + + buildInputs = with pythonPackages; [ nose selenium virtual-display ]; + + /* Hydra fix exists only on github for now. + src = pkgs.fetchurl { + url = "mirror://pypi/I/INGInious/INGInious-${version}.tar.gz"; + }; + */ + src = pkgs.fetchFromGitHub { + owner = "UCL-INGI"; + repo = "INGInious"; + rev = "07d111c0a3045c7cc4e464d4adb8aa28b75a6948"; + sha256 = "0kldbkc9yw1mgg5w5q5v8k2hz089c5c4rvxb5xhbagkzgm2gn230"; + }; + + # Only patch shebangs in /bin, other scripts are run within docker + # containers and will fail if patched. + dontPatchShebangs = true; + preFixup = '' + patchShebangs $prefix/bin + ''; + + meta = { + description = "An intelligent grader that allows secured and automated testing of code made by students"; + homepage = "https://github.com/UCL-INGI/INGInious"; + license = licenses.agpl3; + maintainers = with maintainers; [ layus ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3097ac832654..7145aa06ba26 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13094,6 +13094,8 @@ in inferno = callPackage_i686 ../applications/inferno { }; + inginious = callPackage ../servers/inginious {}; + inkscape = callPackage ../applications/graphics/inkscape { inherit (pythonPackages) python pyxml lxml numpy; lcms = lcms2; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 783de4def10f..7346435f3c49 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11084,70 +11084,6 @@ in modules // { }; }; - inginious = let - # patched version of docker bindings. - docker-custom = self.docker.override { - name = "docker-1.3.0-dirty"; - src = pkgs.fetchFromGitHub { - owner = "GuillaumeDerval"; - repo = "docker-py"; - # tip of branch "master" - rev = "966becd0af514e67de5afbf885257a5005e49626"; - sha256 = "09k41dh86cbb7z4b8926fi5b2qq670mm6agl5py3giacakrap66c"; - }; - }; - - webpy-custom = self.web.override { - name = "web.py-INGI"; - src = pkgs.fetchFromGitHub { - owner = "UCL-INGI"; - repo = "webpy-INGI"; - # tip of branch "ingi" - rev = "f487e78d65d6569eb70003e588d5c6ace54c384f"; - sha256 = "159vwmb8554xk98rw380p3ah170r6gm861r1nqf2l452vvdfxscd"; - }; - }; - in buildPythonPackage rec { - version = "0.3a2.dev0"; - name = "inginious-${version}"; - - disabled = isPy3k; - - patchPhase = '' - # transient failures - substituteInPlace inginious/backend/tests/TestRemoteAgent.py \ - --replace "test_update_task_directory" "noop" - ''; - - propagatedBuildInputs = with self; [ - requests2 - cgroup-utils docker-custom docutils lti mock pygments - pymongo pyyaml rpyc sh simpleldap sphinx_rtd_theme tidylib - websocket_client watchdog webpy-custom - ]; - - buildInputs = with self; [ nose selenium virtual-display ]; - - /* Hydra fix exists only on github for now. - src = pkgs.fetchurl { - url = "mirror://pypi/I/INGInious/INGInious-${version}.tar.gz"; - md5 = "40474dd6b6d4fc26e47a1d9c77bcf943"; - }; - */ - src = pkgs.fetchFromGitHub { - owner = "UCL-INGI"; - repo = "INGInious"; - rev = "e019a0e28c442b4201ec4a0be2a816c4ab639683"; - sha256 = "1pwbm7f7xn50rxzwrqpji58n2ami5r3lgbdpb61q0w3dwkxvvvfk"; - }; - - meta = { - description = "An intelligent grader that allows secured and automated testing of code made by students"; - homepage = "https://github.com/UCL-INGI/INGInious"; - license = licenses.agpl3; - maintainers = with maintainers; [ layus ]; - }; - }; interruptingcow = buildPythonPackage rec { name = "interruptingcow-${version}"; |