Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 17.09 1.5 kB view raw
1{ stdenv, lib, fetchFromGitHub, python, cmake, pyqt5, numpy, scipy, libarcus, doxygen, gettext }: 2 3if lib.versionOlder python.version "3.5.0" 4then throw "Uranium not supported for interpreter ${python.executable}" 5else 6 7stdenv.mkDerivation rec { 8 version = "2.6.1"; 9 pname = "uranium"; 10 name = "${pname}-${version}"; 11 12 src = fetchFromGitHub { 13 owner = "Ultimaker"; 14 repo = "Uranium"; 15 rev = version; 16 sha256 = "1682xwxf6xs1d1cfv1s7xnabqv58jjdb6szz8624b3k9rsj5l2yq"; 17 }; 18 19 buildInputs = [ python gettext ]; 20 propagatedBuildInputs = [ pyqt5 numpy scipy libarcus ]; 21 nativeBuildInputs = [ cmake doxygen ]; 22 23 postPatch = '' 24 sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt 25 sed -i \ 26 -e "s,Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,Resources.addSearchPath(\"$out/share/uranium/resources\")," \ 27 -e "s,self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,self._plugin_registry.addPluginLocation(\"$out/lib/uranium/plugins\")," \ 28 UM/Application.py 29 ''; 30 31 meta = with stdenv.lib; { 32 description = "A Python framework for building Desktop applications"; 33 homepage = https://github.com/Ultimaker/Uranium; 34 license = licenses.agpl3; 35 platforms = platforms.linux; 36 maintainers = with maintainers; [ abbradar ]; 37 }; 38}