lol

python3Packages.uxsim: 1.1.1 -> 1.3.0

+16 -34
+6 -19
pkgs/development/python-modules/uxsim/add-qt-plugin-path-to-env.patch
··· 1 1 diff --git a/uxsim/__init__.py b/uxsim/__init__.py 2 - index 01e1ad1..de1f0fd 100644 2 + index cf661c5..540e6f8 100644 3 3 --- a/uxsim/__init__.py 4 4 +++ b/uxsim/__init__.py 5 - @@ -1,8 +1,14 @@ 6 - -from .uxsim import * 7 - -from .utils import * 5 + @@ -1,3 +1,6 @@ 8 6 +import os 9 - + 7 + +if not os.getenv("QT_PLUGIN_PATH"): 8 + + os.environ["QT_PLUGIN_PATH"] = "$NIX_QT_PLUGIN_PATH" 9 + from .uxsim import * 10 + from .utils import * 10 11 from .analyzer import * 11 - +from .utils import * 12 - +from .uxsim import * 13 - + 14 - +# Only set our own plugin path if it's not already set 15 - +if not os.getenv("QT_PLUGIN_PATH"): 16 - + os.environ["QT_PLUGIN_PATH"] = "$NIX_QT_PLUGIN_PATH" 17 - 18 - __version__ = "1.1.1" 19 - __author__ = "Toru Seo" 20 - __copyright__ = "Copyright (c) 2023 Toru Seo" 21 - -__license__ = "MIT License" 22 - \ No newline at end of file 23 - +__license__ = "MIT License" 24 -
+10 -15
pkgs/development/python-modules/uxsim/default.nix
··· 5 5 setuptools, 6 6 wheel, 7 7 qt5, 8 - hackgen-font, 9 - python3, 8 + python, 9 + dill, 10 10 matplotlib, 11 11 numpy, 12 12 pandas, ··· 17 17 }: 18 18 buildPythonPackage rec { 19 19 pname = "uxsim"; 20 - version = "1.1.1"; 20 + version = "1.3.0"; 21 21 pyproject = true; 22 22 23 23 src = fetchFromGitHub { 24 24 owner = "toruseo"; 25 25 repo = "UXsim"; 26 - rev = "v${version}"; 27 - hash = "sha256-qPAFodvx+Z7RsRhzdTq1TRsbvrUFaqRJZxYg3FM6q8A="; 26 + rev = "refs/tags/v${version}"; 27 + hash = "sha256-2lN2Cu0XXiYdLiE7phpGqhkBDjkmxLJt4ILb6ORWdCI="; 28 28 }; 29 29 30 - patches = [ 31 - ./add-qt-plugin-path-to-env.patch 32 - ]; 30 + patches = [ ./add-qt-plugin-path-to-env.patch ]; 33 31 34 32 nativeBuildInputs = [ 35 33 setuptools ··· 37 35 ]; 38 36 39 37 propagatedBuildInputs = [ 38 + dill 40 39 matplotlib 41 40 numpy 42 41 pandas ··· 46 45 tqdm 47 46 ]; 48 47 49 - pythonImportsCheck = ["uxsim"]; 50 - 48 + pythonImportsCheck = [ "uxsim" ]; 51 49 52 50 # QT_PLUGIN_PATH is required to be set for the program to produce its images 53 51 # our patch sets it to $NIX_QT_PLUGIN_PATH if QT_PLUGIN_PATH is not set 54 52 # and here we replace this string with the actual path to qt plugins 55 53 postInstall = '' 56 - substituteInPlace $out/${python3.sitePackages}/uxsim/__init__.py \ 54 + substituteInPlace $out/${python.sitePackages}/uxsim/__init__.py \ 57 55 --replace-fail '$NIX_QT_PLUGIN_PATH' '${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}' 58 - 59 - mkdir -p $out/${python3.sitePackages}/uxsim/files 60 - ln -s ${hackgen-font}/share/fonts/hackgen/HackGen-Regular.ttf $out/${python3.sitePackages}/uxsim/files/ 61 56 ''; 62 57 63 58 meta = with lib; { 64 59 description = "Vehicular traffic flow simulator in road network, written in pure Python"; 65 60 homepage = "https://github.com/toruseo/UXsim"; 66 61 license = licenses.mit; 67 - maintainers = with maintainers; [vinnymeller]; 62 + maintainers = with maintainers; [ vinnymeller ]; 68 63 }; 69 64 }