Unverified Commit c97e873b authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

ghstack: fix package build failure after Poetry to uv migration (#470250)

parents a8ea192d dfc16bc4
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  fetchFromGitHub,
}:

python3.pkgs.buildPythonApplication {
python3.pkgs.buildPythonApplication rec {
  pname = "ghstack";
  version = "0.12.0";
  pyproject = true;
@@ -12,11 +12,16 @@ python3.pkgs.buildPythonApplication {
  src = fetchFromGitHub {
    owner = "ezyang";
    repo = "ghstack";
    rev = "fa7e7023d798aad6b115b88c5ad67ce88a4fc2a6";
    hash = "sha256-Ywwjeupa8eE/vkrbl5SIbvQs53xaLnq9ieWRFwzmuuc=";
    tag = version;
    hash = "sha256-pLKwDezkwGrqYgP4WnIl5nAam6bMNO6BK+xbxhp7Aq8=";
  };

  build-system = [ python3.pkgs.poetry-core ];
  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail 'requires = ["uv_build>=0.6,<0.7"]' 'requires = ["uv_build>=0.6"]'
  '';

  build-system = [ python3.pkgs.uv-build ];

  dependencies = with python3.pkgs; [
    aiohttp
@@ -27,13 +32,16 @@ python3.pkgs.buildPythonApplication {
    typing-extensions
  ];

  pythonImportsCheck = [ "ghstack" ];
  pythonImportsCheck = [ "ghstack.cli" ];

  meta = {
    description = "Submit stacked diffs to GitHub on the command line";
    homepage = "https://github.com/ezyang/ghstack";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ munksgaard ];
    maintainers = with lib.maintainers; [
      munksgaard
      shikanime
    ];
    mainProgram = "ghstack";
  };
}