pytest-splinter override fix

This commit is contained in:
Tom Sydney Kerckhove 2021-01-21 10:44:39 +01:00 committed by adisbladis
parent 7887e57c17
commit 76ac8727d6
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -1034,6 +1034,28 @@ self: super:
}
);
# pytest-splinter seems to put a .marker file in an empty directory
# presumably so it's tracked by and can be installed with MANIFEST.in, see
# https://github.com/pytest-dev/pytest-splinter/commit/a48eeef662f66ff9d3772af618748e73211a186b
#
# This directory then gets used as an empty initial profile directory and is
# zipped up. But if the .marker file is in the Nix store, it has the
# creation date of 1970, and Zip doesn't work with such old files, so it
# fails at runtime!
#
# We fix this here by just removing the file after the installation
#
# The error you get without this is:
#
# E ValueError: ZIP does not support timestamps before 1980
# /nix/store/55b9ip7xkpimaccw9pa0vacy5q94f5xa-python3-3.7.6/lib/python3.7/zipfile.py:357: ValueError
pytest-splinter = super.pytest-splinter.overrideAttrs (old: {
postInstall = old.postInstall or "" + ''
rm $out/${super.python.sitePackages}/pytest_splinter/profiles/firefox/.marker
'';
});
ffmpeg-python = super.ffmpeg-python.overridePythonAttrs (
old: {
buildInputs = old.buildInputs ++ [ self.pytest-runner ];