nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 git,
5 nodejs,
6 python3,
7}:
8
9let
10 py = python3.override {
11 packageOverrides = final: prev: {
12 # Requires "pydot >= 1.4.1, <3",
13 pydot = prev.pydot.overridePythonAttrs (old: rec {
14 version = "2.0.0";
15 src = old.src.override {
16 inherit version;
17 hash = "sha256-YCRq8hUSP6Bi8hzXkb5n3aI6bygN8J9okZ5jeh5PMjU=";
18 };
19 doCheck = false;
20 });
21 };
22 };
23in
24with py.pkgs;
25
26py.pkgs.buildPythonApplication rec {
27 pname = "cwltool";
28 version = "3.1.20250110105449";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "common-workflow-language";
33 repo = "cwltool";
34 tag = version;
35 hash = "sha256-V0CQiNkIw81s6e9224qcfbsOqBvMo34q+lRURpRetKs=";
36 };
37
38 postPatch = ''
39 substituteInPlace setup.py \
40 --replace-fail "prov == 1.5.1" "prov" \
41 --replace-fail '"schema-salad >= 8.7, < 9",' '"schema-salad",' \
42 --replace-fail "PYTEST_RUNNER + " ""
43 substituteInPlace pyproject.toml \
44 --replace-fail "mypy==1.14.1" "mypy"
45 '';
46
47 build-system = with py.pkgs; [
48 setuptools
49 setuptools-scm
50 ];
51
52 nativeBuildInputs = [ git ];
53
54 dependencies = with py.pkgs; [
55 argcomplete
56 bagit
57 coloredlogs
58 cwl-utils
59 mypy
60 mypy-extensions
61 prov
62 psutil
63 pydot
64 rdflib
65 requests
66 rich-argparse
67 ruamel-yaml
68 schema-salad
69 shellescape
70 spython
71 toml
72 types-psutil
73 types-requests
74 typing-extensions
75 ];
76
77 nativeCheckInputs = with py.pkgs; [
78 mock
79 nodejs
80 pytest-mock
81 pytest-httpserver
82 pytest-xdist
83 pytestCheckHook
84 ];
85
86 disabledTests = [
87 "test_content_types"
88 "test_env_filtering"
89 "test_http_path_mapping"
90 "test_modification_date"
91 ];
92
93 disabledTestPaths = [
94 "tests/test_udocker.py"
95 "tests/test_provenance.py"
96 ];
97
98 pythonImportsCheck = [
99 "cwltool"
100 ];
101
102 meta = {
103 description = "Common Workflow Language reference implementation";
104 homepage = "https://www.commonwl.org";
105 changelog = "https://github.com/common-workflow-language/cwltool/releases/tag/${version}";
106 license = lib.licenses.asl20;
107 maintainers = with lib.maintainers; [ veprbl ];
108 mainProgram = "cwltool";
109 };
110}