mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 06:55:10 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
36 lines
1.0 KiB
Nix
36 lines
1.0 KiB
Nix
{ lib, python3, fetchPypi, git, mercurial }:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "bumpver";
|
|
version = "2021.1110";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "b6a0ddb78db7e00ae7ffe895bf8ef97f91e6310dfc1c4721896bdfd044b1cb03";
|
|
};
|
|
|
|
prePatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "if any(arg.startswith(\"bdist\") for arg in sys.argv):" ""\
|
|
--replace "import lib3to6" ""\
|
|
--replace "package_dir = lib3to6.fix(package_dir)" ""
|
|
'';
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [ pathlib2 click toml lexid colorama setuptools ];
|
|
|
|
nativeCheckInputs = [ python3.pkgs.pytestCheckHook git mercurial ];
|
|
|
|
disabledTests = [
|
|
# fails due to more aggressive setuptools version specifier validation
|
|
"test_parse_default_pattern"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Bump version numbers in project files";
|
|
homepage = "https://pypi.org/project/bumpver/";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ kfollesdal ];
|
|
mainProgram = "bumpver";
|
|
};
|
|
}
|