python3Packages.{shellingham,git-dummy}: cleanup (#492860)

This commit is contained in:
kirillrdy
2026-02-21 23:55:53 +00:00
committed by GitHub
2 changed files with 28 additions and 12 deletions
@@ -3,14 +3,20 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
installShellFiles,
# build-system
setuptools,
# dependencies
gitpython,
typer,
pydantic-settings,
typer,
# nativeBuildInputs
installShellFiles,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "git-dummy";
version = "0.1.2";
pyproject = true;
@@ -18,7 +24,7 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "initialcommit-com";
repo = "git-dummy";
rev = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-viybxn2J7SO7NgSvjwlP+tgtm+H6QrACafIy82d9XEk=";
};
@@ -26,8 +32,8 @@ buildPythonPackage rec {
dependencies = [
gitpython
typer
pydantic-settings
typer
];
nativeBuildInputs = [ installShellFiles ];
@@ -42,9 +48,11 @@ buildPythonPackage rec {
'';
meta = {
homepage = "https://github.com/initialcommit-com/git-dummy";
description = "Generate dummy Git repositories populated with the desired number of commits, branches, and structure";
homepage = "https://github.com/initialcommit-com/git-dummy";
changelog = "https://github.com/initialcommit-com/git-dummy/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ mathiassven ];
mainProgram = "git-dummy";
};
}
})
@@ -2,12 +2,13 @@
lib,
buildPythonPackage,
fetchFromGitHub,
procps,
setuptools,
pytest-mock,
pytestCheckHook,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "shellingham";
version = "1.5.4";
pyproject = true;
@@ -15,11 +16,18 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "sarugaku";
repo = "shellingham";
tag = version;
tag = finalAttrs.version;
hash = "sha256-xeBo3Ok+XPrHN4nQd7M8/11leSV/8z1f7Sj33+HFVtQ=";
};
nativeBuildInputs = [ setuptools ];
postPatch = ''
substituteInPlace src/shellingham/posix/ps.py \
--replace-fail \
'cmd = ["ps",' \
'cmd = ["${lib.getExe' procps "ps"}",'
'';
build-system = [ setuptools ];
nativeCheckInputs = [
pytest-mock
@@ -31,8 +39,8 @@ buildPythonPackage rec {
meta = {
description = "Tool to detect the surrounding shell";
homepage = "https://github.com/sarugaku/shellingham";
changelog = "https://github.com/sarugaku/shellingham/blob/${version}/CHANGELOG.rst";
changelog = "https://github.com/sarugaku/shellingham/blob/${finalAttrs.src.tag}/CHANGELOG.rst";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ mbode ];
};
}
})