Files
nixpkgs/pkgs/development/python-modules/macholib/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

57 lines
1.2 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
unittestCheckHook,
altgraph,
setuptools,
typing-extensions,
pyinstaller,
}:
buildPythonPackage rec {
pname = "macholib";
version = "1.16.3";
pyproject = true;
src = fetchFromGitHub {
owner = "ronaldoussoren";
repo = "macholib";
rev = "v${version}";
hash = "sha256-bTql10Ceny4fBCxnEWz1m1wi03EWMDW9u99IQiWYbnY=";
};
build-system = [ setuptools ];
dependencies = [
altgraph
]
++ lib.optionals (pythonOlder "3.11") [
typing-extensions
];
# Checks assume to find darwin specific libraries
doCheck = stdenv.buildPlatform.isDarwin;
nativeCheckInputs = [
unittestCheckHook
];
passthru.tests = {
inherit pyinstaller; # Requires macholib for darwin
};
preCheck = ''
export PATH="$PATH:$out/bin"
'';
meta = {
description = "Analyze and edit Mach-O headers, the executable format used by Mac OS X";
homepage = "https://github.com/ronaldoussoren/macholib";
changelog = "https://github.com/ronaldoussoren/macholib/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ eveeifyeve ];
};
}