567e8dfd8e
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>
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
mypy-extensions,
|
|
pytest-xdist,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
ruamel-yaml,
|
|
schema-salad,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "cwl-upgrader";
|
|
version = "1.2.12";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "common-workflow-language";
|
|
repo = "cwl-upgrader";
|
|
tag = "v${version}";
|
|
hash = "sha256-cfEd1XAu31u+NO27d3RNA5lhCpRpYK8NeaCxhQ/1GNU=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# Version detection doesn't work for schema_salad
|
|
substituteInPlace pyproject.toml \
|
|
--replace '"schema_salad",' ""
|
|
'';
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
propagatedBuildInputs = [
|
|
mypy-extensions
|
|
ruamel-yaml
|
|
schema-salad
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "cwlupgrader" ];
|
|
|
|
meta = {
|
|
description = "Library to upgrade CWL syntax to a newer version";
|
|
mainProgram = "cwl-upgrader";
|
|
homepage = "https://github.com/common-workflow-language/cwl-upgrader";
|
|
changelog = "https://github.com/common-workflow-language/cwl-upgrader/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
}
|