diff --git a/pkgs/development/python-modules/git-dummy/default.nix b/pkgs/development/python-modules/git-dummy/default.nix index 2fffa2d6e06c..156ab57fe99b 100644 --- a/pkgs/development/python-modules/git-dummy/default.nix +++ b/pkgs/development/python-modules/git-dummy/default.nix @@ -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"; }; -} +}) diff --git a/pkgs/development/python-modules/shellingham/default.nix b/pkgs/development/python-modules/shellingham/default.nix index 3b1694e7d02f..5731146598cf 100644 --- a/pkgs/development/python-modules/shellingham/default.nix +++ b/pkgs/development/python-modules/shellingham/default.nix @@ -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 ]; }; -} +})