1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 ds-store,
7 importlib-resources,
8 mac-alias,
9}:
10
11buildPythonPackage rec {
12 pname = "dmgbuild";
13 version = "1.6.2";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "dmgbuild";
18 repo = "dmgbuild";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-PozYxmXumFnptIgb4FM4b/Q5tx0MIS2bVw2kCuGucA8=";
21 };
22
23 postPatch = ''
24 # relax all deps
25 substituteInPlace pyproject.toml \
26 --replace-fail "==" ">="
27 '';
28
29 build-system = [
30 setuptools
31 ];
32
33 dependencies = [
34 ds-store
35 importlib-resources
36 mac-alias
37 ];
38
39 pythonImportsCheck = [
40 "dmgbuild"
41 ];
42
43 # require permissions to access TextEditor.app
44 # https://github.com/dmgbuild/dmgbuild/blob/refs/tags/v1.6.2/tests/examples/settings.py#L17
45 doCheck = false;
46
47 meta = {
48 description = "MacOS command line utility to build disk images";
49 homepage = "https://github.com/dmgbuild/dmgbuild";
50 changelog = "https://github.com/dmgbuild/dmgbuild/releases/tag/v${version}";
51 license = lib.licenses.mit;
52 maintainers = with lib.maintainers; [ moraxyc ];
53 mainProgram = "dmgbuild";
54 platforms = lib.platforms.darwin;
55 };
56}