Unverified Commit 3f44ade8 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #327392 from wegank/localstack-fix

python312Packages.localstack: fix build
parents 72623f50 98100c75
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -4,8 +4,10 @@
  fetchFromGitHub,
  apispec,
  boto3,
  build,
  cachetools,
  click,
  cryptography,
  localstack-client,
  localstack-ext,
  plux,
@@ -22,7 +24,7 @@
buildPythonPackage rec {
  pname = "localstack";
  version = "3.5.0";
  format = "setuptools";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "localstack";
@@ -31,18 +33,13 @@ buildPythonPackage rec {
    hash = "sha256-Sd5B4+pvUwNXfP3hsqBkUoHo06YyzUGCUHzc8f77Vx4=";
  };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "requests>=2.20.0,<2.26" "requests~=2.20" \
      --replace "cachetools~=5.0.0" "cachetools~=5.0" \
      --replace "boto3>=1.20,<1.25.0" "boto3~=1.20"
  '';

  propagatedBuildInputs = [
  dependencies = [
    apispec
    boto3
    build
    cachetools
    click
    cryptography
    localstack-client
    localstack-ext
    plux
@@ -56,13 +53,20 @@ buildPythonPackage rec {
    tailer
  ];

  pythonRelaxDeps = [ "dill" ];

  pythonImportsCheck = [ "localstack" ];

  # Test suite requires boto, which has been removed from nixpkgs
  # Just do minimal test, buildPythonPackage maps checkPhase
  # to installCheckPhase, so we can test that entrypoint point works.
  checkPhase = ''
    runHook preCheck

    export HOME=$(mktemp -d)
    $out/bin/localstack --version

    runHook postCheck
  '';

  meta = with lib; {