summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2021-11-28 17:40:08 +0000
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2021-11-28 22:12:00 +0000
commit56710e1546ae5f1f226dda88dc38bcebd1065a51 (patch)
tree60249bc5a8e070131e373c96987b2edf854cfdb0
parentMerge pull request #147774 from NixOS/backport-147756-to-release-21.11 (diff)
downloadnixpkgs-56710e1546ae5f1f226dda88dc38bcebd1065a51.tar.gz
python3Packages.pywal: use $TMPDIR in tests
darwin hydra can fail to access /tmp (cherry picked from commit 1e3b8e3fd835832864d8038d9d6bb906372a764e)
-rw-r--r--pkgs/development/python-modules/pywal/default.nix21
1 files changed, 13 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/pywal/default.nix b/pkgs/development/python-modules/pywal/default.nix
index ccc862f8aa47..2e09573d848c 100644
--- a/pkgs/development/python-modules/pywal/default.nix
+++ b/pkgs/development/python-modules/pywal/default.nix
@@ -9,24 +9,29 @@ buildPythonPackage rec {
sha256 = "1drha9kshidw908k7h3gd9ws2bl64ms7bjcsa83pwb3hqa9bkspg";
};
- preCheck = ''
- mkdir tmp
- HOME=$PWD/tmp
- '';
-
patches = [
./convert.patch
./feh.patch
];
- # Invalid syntax
- disabled = !isPy3k;
-
postPatch = ''
substituteInPlace pywal/backends/wal.py --subst-var-by convert "${imagemagick}/bin/convert"
substituteInPlace pywal/wallpaper.py --subst-var-by feh "${feh}/bin/feh"
'';
+ # Invalid syntax
+ disabled = !isPy3k;
+
+ preCheck = ''
+ mkdir tmp
+ HOME=$PWD/tmp
+
+ for f in tests/test_export.py tests/test_util.py ; do
+ substituteInPlace "$f" \
+ --replace '/tmp/' "$TMPDIR/"
+ done
+ '';
+
meta = with lib; {
description = "Generate and change colorschemes on the fly. A 'wal' rewrite in Python 3";
homepage = "https://github.com/dylanaraps/pywal";