From 0a6a8cb750b3a07c8ccbfc6f7b4700a661cda995 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Sun, 27 Oct 2024 13:45:18 +0800 Subject: [PATCH] python312Packages.dmgbuild: init at 1.6.2 --- .../python-modules/dmgbuild/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/dmgbuild/default.nix diff --git a/pkgs/development/python-modules/dmgbuild/default.nix b/pkgs/development/python-modules/dmgbuild/default.nix new file mode 100644 index 0000000000000..e0a8f3ef11387 --- /dev/null +++ b/pkgs/development/python-modules/dmgbuild/default.nix @@ -0,0 +1,56 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + ds-store, + importlib-resources, + mac-alias, +}: + +buildPythonPackage rec { + pname = "dmgbuild"; + version = "1.6.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "dmgbuild"; + repo = "dmgbuild"; + rev = "refs/tags/v${version}"; + hash = "sha256-PozYxmXumFnptIgb4FM4b/Q5tx0MIS2bVw2kCuGucA8="; + }; + + postPatch = '' + # relax all deps + substituteInPlace pyproject.toml \ + --replace-fail "==" ">=" + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ + ds-store + importlib-resources + mac-alias + ]; + + pythonImportsCheck = [ + "dmgbuild" + ]; + + # require permissions to access TextEditor.app + # https://github.com/dmgbuild/dmgbuild/blob/refs/tags/v1.6.2/tests/examples/settings.py#L17 + doCheck = false; + + meta = { + description = "MacOS command line utility to build disk images"; + homepage = "https://github.com/dmgbuild/dmgbuild"; + changelog = "https://github.com/dmgbuild/dmgbuild/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ moraxyc ]; + mainProgram = "dmgbuild"; + platforms = lib.platforms.darwin; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0e4926959ab1d..23a88e910b64d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3616,6 +3616,8 @@ self: super: with self; { dmenu-python = callPackage ../development/python-modules/dmenu { }; + dmgbuild = callPackage ../development/python-modules/dmgbuild { }; + dmt-core = callPackage ../development/python-modules/dmt-core { }; dm-control = callPackage ../development/python-modules/dm-control { };