Unverified Commit 108b6d46 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #328982 from pbsds/fix-easyabc-1721590546

python311Packages.cx-freeze: fix build
parents 026a72f8 df6f9dda
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -4,8 +4,9 @@
  fetchPypi,
  pythonOlder,
  ncurses,
  importlib-metadata,
  setuptools,
  filelock,
  typing-extensions,
  wheel,
  patchelf,
}:
@@ -23,22 +24,28 @@ buildPythonPackage rec {
    hash = "sha256-M1wwutDj5lNlXyMJkzCEWL7cmXuvW3qZXoZB3rousoc=";
  };

  nativeBuildInputs = [
  pythonRelaxDeps = [
    "setuptools"
    "wheel"
  ];

  build-system = [
    setuptools
    wheel
  ];

  propagatedBuildInputs = [
    importlib-metadata # upstream has this for 3.8 as well
  buildInputs = [
    ncurses
  ];

  dependencies = [
    filelock
    setuptools
  ] ++ lib.optionals (pythonOlder "3.10") [
    typing-extensions
  ];

  postPatch = ''
    # timestamp need to come after 1980 for zipfiles and nix store is set to epoch
    substituteInPlace cx_Freeze/freezer.py \
      --replace "st.st_mtime" "time.time()"

    sed -i /patchelf/d pyproject.toml
  '';