Files
nixpkgs/pkgs/development/python-modules/jpype1/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

68 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
ant,
openjdk,
packaging,
pyinstaller,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "jpype1";
version = "1.6.0";
pyproject = true;
src = fetchFromGitHub {
owner = "originell";
repo = "jpype";
tag = "v${version}";
hash = "sha256-CDiVQugxLgmUwAG0e0ryamWvrjUaJxJrU0YSFIIWS1I=";
};
build-system = [ setuptools ];
nativeBuildInputs = [
ant
openjdk
];
preBuild = ''
ant -f native/build.xml jar
'';
dependencies = [ packaging ];
nativeCheckInputs = [
pyinstaller
pytestCheckHook
];
# Cannot find various classes. If you want to fix this
# take a look at the opensuse packaging:
# https://build.opensuse.org/projects/openSUSE:Factory/packages/python-JPype1/files/python-JPype1.spec?expand=1
doCheck = false;
preCheck = ''
ant -f test/build.xml compile
'';
pythonImportsCheck = [
"jpype"
"jpype.imports"
"jpype.types"
];
meta = {
homepage = "https://github.com/originell/jpype/";
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode
];
license = lib.licenses.asl20;
description = "Python to Java bridge";
};
}