ghstack: modernize

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
Ethan Carter Edwards
2026-08-27 10:43:24 -04:00
parent a8c186dc7e
commit 436400a6ee

View File

@@ -1,14 +1,18 @@
{
lib,
python3,
python3Packages,
fetchFromGitHub,
versionCheckHook,
writableTmpDirAsHomeHook,
}:
python3.pkgs.buildPythonApplication (finalAttrs: {
python3Packages.buildPythonApplication (finalAttrs: {
pname = "ghstack";
version = "0.13.0";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "ezyang";
repo = "ghstack";
@@ -21,9 +25,9 @@ python3.pkgs.buildPythonApplication (finalAttrs: {
--replace-fail 'requires = ["uv_build>=0.6,<0.7"]' 'requires = ["uv_build>=0.6"]'
'';
build-system = [ python3.pkgs.uv-build ];
build-system = [ python3Packages.uv-build ];
dependencies = with python3.pkgs; [
dependencies = with python3Packages; [
aiohttp
click
flake8
@@ -34,6 +38,14 @@ python3.pkgs.buildPythonApplication (finalAttrs: {
pythonImportsCheck = [ "ghstack.cli" ];
# pytests require sqlite db access
versionCheckKeepEnvironment = [ "HOME" ];
nativeCheckInputs = [
versionCheckHook
writableTmpDirAsHomeHook
];
meta = {
description = "Submit stacked diffs to GitHub on the command line";
homepage = "https://github.com/ezyang/ghstack";