Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / uranium / default.nix
blob8af65b0cc65d7171c8d4f72c6288ddbc3c951ca9
1 { lib, buildPythonPackage, fetchFromGitHub, python, cmake
2 , pyqt5, numpy, scipy, shapely, libarcus, cryptography, doxygen, gettext, pythonOlder }:
4 buildPythonPackage rec {
5   version = "4.12.0";
6   pname = "uranium";
7   format = "other";
9   src = fetchFromGitHub {
10     owner = "Ultimaker";
11     repo = "Uranium";
12     rev = version;
13     hash = "sha256-SE9xqrloPXIRTJiiqUdRKFmb4c0OjmJK5CMn6VXMFmk=";
14   };
16   disabled = pythonOlder "3.5.0";
18   buildInputs = [ python gettext ];
19   propagatedBuildInputs = [ pyqt5 numpy scipy shapely libarcus cryptography ];
20   nativeBuildInputs = [ cmake doxygen ];
22   postPatch = ''
23     sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
24     sed -i \
25      -e "s,Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,Resources.addSearchPath(\"$out/share/uranium/resources\")," \
26      -e "s,self._plugin_registry.addPluginLocation(os.path.join(os.path.abspath(os.path.dirname(__file__)).*,self._plugin_registry.addPluginLocation(\"$out/lib/uranium/plugins\")," \
27      UM/Application.py
28   '';
30   meta = with lib; {
31     description = "A Python framework for building Desktop applications";
32     homepage = "https://github.com/Ultimaker/Uranium";
33     license = licenses.lgpl3Plus;
34     platforms = platforms.linux;
35     maintainers = with maintainers; [ abbradar gebner ];
36   };