Files
nixpkgs/pkgs/development/python-modules/isal/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

72 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
replaceVars,
# build-system
setuptools,
versioningit,
# native dependencies
isa-l,
# tests
pytest-timeout,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "isal";
version = "1.7.2";
pyproject = true;
src = fetchFromGitHub {
owner = "pycompression";
repo = "python-isal";
rev = "v${version}";
hash = "sha256-gvUVSGarPA4KupQTd61x75CfqNVqZfFC1zq0R21Clf8=";
};
patches = [
(replaceVars ./version.patch {
inherit version;
})
];
build-system = [
setuptools
versioningit
];
buildInputs = [ isa-l ];
env.PYTHON_ISAL_LINK_DYNAMIC = true;
nativeCheckInputs = [
pytest-timeout
pytestCheckHook
];
pytestFlagsArray = [ "tests" ];
disabledTests = [
# calls `python -m isal` and fails on import
"test_compress_fast_best_are_exclusive"
"test_compress_infile_outfile"
"test_compress_infile_outfile_default"
"test_decompress_cannot_have_flags_compression"
"test_decompress_infile_outfile_error"
];
pythonImportsCheck = [ "isal" ];
meta = with lib; {
changelog = "https://github.com/pycompression/python-isal/blob/${src.rev}/CHANGELOG.rst";
description = "Faster zlib and gzip compatible compression and decompression by providing python bindings for the isa-l library";
homepage = "https://github.com/pycompression/python-isal";
license = licenses.psfl;
maintainers = with maintainers; [ hexa ];
};
}