python3Packages.craft-cli: init at 2.5.1
This commit is contained in:
parent
c64a4b4425
commit
dd9089b957
69
pkgs/development/python-modules/craft-cli/default.nix
Normal file
69
pkgs/development/python-modules/craft-cli/default.nix
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, nix-update-script
|
||||||
|
, platformdirs
|
||||||
|
, pydantic_1
|
||||||
|
, pyyaml
|
||||||
|
, setuptools
|
||||||
|
, setuptools-scm
|
||||||
|
, pytest-check
|
||||||
|
, pytest-mock
|
||||||
|
, pytestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "craft-cli";
|
||||||
|
version = "2.5.1";
|
||||||
|
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "canonical";
|
||||||
|
repo = "craft-cli";
|
||||||
|
rev = "refs/tags/${version}";
|
||||||
|
hash = "sha256-yEKF04OPu4paRrghAP78r9hu6cqkUy6z/V7cHNys82I=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace craft_cli/__init__.py \
|
||||||
|
--replace-fail "dev" "${version}"
|
||||||
|
|
||||||
|
substituteInPlace pyproject.toml \
|
||||||
|
--replace-fail "setuptools==67.7.2" "setuptools"
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
platformdirs
|
||||||
|
pydantic_1
|
||||||
|
pyyaml
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"craft_cli"
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytest-check
|
||||||
|
pytest-mock
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pytestFlagsArray = [ "tests/unit" ];
|
||||||
|
|
||||||
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A CLI builder for Canonical's CLI Guidelines";
|
||||||
|
homepage = "https://github.com/canonical/craft-cli";
|
||||||
|
changelog = "https://github.com/canonical/craft-cli/releases/tag/${version}";
|
||||||
|
license = lib.licenses.lgpl3Only;
|
||||||
|
maintainers = with lib.maintainers; [ jnsgruk ];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -2447,6 +2447,8 @@ self: super: with self; {
|
||||||
|
|
||||||
cpyparsing = callPackage ../development/python-modules/cpyparsing { };
|
cpyparsing = callPackage ../development/python-modules/cpyparsing { };
|
||||||
|
|
||||||
|
craft-cli = callPackage ../development/python-modules/craft-cli { };
|
||||||
|
|
||||||
craft-grammar = callPackage ../development/python-modules/craft-grammar { };
|
craft-grammar = callPackage ../development/python-modules/craft-grammar { };
|
||||||
|
|
||||||
craft-parts = callPackage ../development/python-modules/craft-parts { };
|
craft-parts = callPackage ../development/python-modules/craft-parts { };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user