From 868794010fb1d8295d6b83561f3c6d489d5ed818 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 26 Feb 2017 00:59:08 +0300 Subject: [PATCH] python.pkgs.uranium: init at 2.4.0 --- .../python-modules/uranium/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/uranium/default.nix diff --git a/pkgs/development/python-modules/uranium/default.nix b/pkgs/development/python-modules/uranium/default.nix new file mode 100644 index 00000000000..bce88635d3c --- /dev/null +++ b/pkgs/development/python-modules/uranium/default.nix @@ -0,0 +1,37 @@ +{ stdenv, lib, fetchFromGitHub, python, cmake, pyqt5, numpy, scipy, libarcus }: + +if lib.versionOlder python.version "3.5.0" +then throw "Uranium not supported for interpreter ${python.executable}" +else + +stdenv.mkDerivation rec { + name = "uranium-${version}"; + version = "2.4.0"; + + src = fetchFromGitHub { + owner = "Ultimaker"; + repo = "Uranium"; + rev = version; + sha256 = "1jpl0ryk8xdppillk5wzr2415n50cpa09shn1xqj6y96fg22l2il"; + }; + + buildInputs = [ python ]; + propagatedBuildInputs = [ pyqt5 numpy scipy libarcus ]; + nativeBuildInputs = [ cmake ]; + + postPatch = '' + sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt + sed -i \ + -e "s,Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,Resources.addSearchPath(\"$out/share/uranium/resources\")," \ + -e "s,self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,self._plugin_registry.addPluginLocation(\"$out/lib/uranium/plugins\")," \ + UM/Application.py + ''; + + meta = with stdenv.lib; { + description = "A Python framework for building Desktop applications"; + homepage = "https://github.com/Ultimaker/Uranium"; + license = licenses.agpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1c02e12a44e..d9ec862146c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -32010,6 +32010,8 @@ EOF }; }; + uranium = callPackage ../development/python-modules/uranium { }; + urlscan = callPackage ../applications/misc/urlscan { }; vine = buildPythonPackage rec {