Skip to content

Commit

Permalink
Merge pull request #177170 from ifurther/add-python-pyjnius
Browse files Browse the repository at this point in the history
python3Packages.pyjnius: init at 1.4.0
  • Loading branch information
onny authored Sep 6, 2022
2 parents 4af048f + dbd69e7 commit 0ae5851
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5562,6 +5562,12 @@
githubId = 1550265;
name = "Dominic Steinitz";
};
ifurther = {
email = "55025025+ifurther@users.noreply.github.com";
github = "ifurther";
githubId = 55025025;
name = "Feather Lin";
};
igsha = {
email = "igor.sharonov@gmail.com";
github = "igsha";
Expand Down
31 changes: 31 additions & 0 deletions pkgs/development/python-modules/pyjnius/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{ buildPythonPackage
, cython
, fetchPypi
, jdk
, lib
, six
}:

buildPythonPackage rec {
pname = "pyjnius";
version = "1.4.1";

src = fetchPypi {
inherit pname version;
sha256 = "8bc1a1b06fb11df8dd8b8d56f5ecceab614d4ba70cf559c64ae2f146423d53ce";
};
propagatedBuildInputs = [
six
];

nativeBuildInputs = [ jdk cython ];

pythonImportsCheck = [ "jnius" ];

meta = with lib; {
description = "A Python module to access Java classes as Python classes using the Java Native Interface (JNI)";
homepage = "https://github.com/kivy/pyjnius";
license = licenses.mit;
maintainers = with maintainers; [ ifurther ];
};
}
4 changes: 4 additions & 0 deletions pkgs/development/tools/pipenv/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ lib
, stdenv
, python3
, installShellFiles
}:
Expand All @@ -13,6 +14,9 @@ let
pip
virtualenv
virtualenv-clone
]
++ lib.optionals stdenv.hostPlatform.isAndroid [
pyjnius
];

pythonEnv = python3.withPackages runtimeDeps;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7823,6 +7823,8 @@ in {

pyjks = callPackage ../development/python-modules/pyjks { };

pyjnius = callPackage ../development/python-modules/pyjnius { };

pyjsparser = callPackage ../development/python-modules/pyjsparser { };

pyjwkest = callPackage ../development/python-modules/pyjwkest { };
Expand Down

0 comments on commit 0ae5851

Please sign in to comment.