python312Packages.py-libzfs: modernize
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch2,
|
||||
setuptools,
|
||||
cython_0,
|
||||
zfs,
|
||||
}:
|
||||
@@ -27,16 +28,16 @@ buildPythonPackage rec {
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cython_0 ];
|
||||
build-system = [ cython_0 ];
|
||||
buildInputs = [ zfs ];
|
||||
|
||||
# Passing CFLAGS in configureFlags does not work, see https://github.com/truenas/py-libzfs/issues/107
|
||||
postPatch = lib.optionalString stdenv.isLinux ''
|
||||
substituteInPlace configure \
|
||||
--replace \
|
||||
--replace-fail \
|
||||
'CFLAGS="-DCYTHON_FALLTHROUGH"' \
|
||||
'CFLAGS="-DCYTHON_FALLTHROUGH -I${zfs.dev}/include/libzfs -I${zfs.dev}/include/libspl"' \
|
||||
--replace 'zof=false' 'zof=true'
|
||||
--replace-fail 'zof=false' 'zof=true'
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "libzfs" ];
|
||||
|
||||
Reference in New Issue
Block a user