nixpkgs/pkgs/development/python-modules/pylddwrap/default.nix
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

65 lines
1.6 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
icontract,
pytestCheckHook,
replaceVars,
setuptools,
typing-extensions,
}:
buildPythonPackage rec {
pname = "pylddwrap";
version = "1.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "Parquery";
repo = "pylddwrap";
rev = "v${version}";
hash = "sha256-Gm82VRu8GP52BohQzpMUJfh6q2tiUA2GJWOcG7ymGgg=";
};
patches = [
(replaceVars ./replace_env_with_placeholder.patch {
ldd_bin = "${stdenv.cc.bintools.libc_bin}/bin/ldd";
})
];
# Upstream adds some plain text files direct to the package's root directory
# https://github.com/Parquery/pylddwrap/blob/master/setup.py#L71
postInstall = ''
rm -f $out/{LICENSE,README.rst,requirements.txt}
'';
build-system = [ setuptools ];
propagatedBuildInputs = [
icontract
typing-extensions
];
nativeCheckInputs = [ pytestCheckHook ];
# uses mocked ldd from PATH, but we are patching the source to not look at PATH
disabledTests = [
"TestAgainstMockLdd"
"TestMain"
];
pythonImportsCheck = [ "lddwrap" ];
meta = {
description = "Python wrapper around ldd *nix utility to determine shared libraries of a program";
mainProgram = "pylddwrap";
homepage = "https://github.com/Parquery/pylddwrap";
changelog = "https://github.com/Parquery/pylddwrap/blob/v${version}/CHANGELOG.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ thiagokokada ];
# should work in any Unix platform that uses glibc, except for darwin
# since it has its own tool (`otool`)
badPlatforms = lib.platforms.darwin;
};
}