nixpkgs/pkgs/applications/science/math/sage/spkg-singular.patch
Timo Kaufmann 272e930827 sage: fix non-deterministic build failures
The build was failing on some machines because of a `find` command that
touched files in different orders on different machines.

That confused `make`s timestamp mechanism.
2018-02-05 15:03:24 +01:00

19 lines
612 B
Diff

diff --git a/build/pkgs/singular/spkg-install b/build/pkgs/singular/spkg-install
index 8caafb1699..3c34e6608a 100644
--- a/build/pkgs/singular/spkg-install
+++ b/build/pkgs/singular/spkg-install
@@ -2,6 +2,13 @@
## Singular
###########################################
+# Fix hardcoded paths, while making sure to only update timestamps of actually
+# changed files (otherwise confuses make)
+grep -rlF '/bin/rm' . | while read file
+do
+ sed -e 's@/bin/rm@rm@g' -i "$file"
+done
+
if [ -z "$SAGE_LOCAL" ]; then
echo >&2 "Error: SAGE_LOCAL undefined -- exiting..."
echo >&2 "Maybe run 'sage -sh'?"