summary refs log tree commit diff
path: root/pkgs/applications/science/math/palp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science/math/palp/default.nix')
-rw-r--r--pkgs/applications/science/math/palp/default.nix19
1 files changed, 17 insertions, 2 deletions
diff --git a/pkgs/applications/science/math/palp/default.nix b/pkgs/applications/science/math/palp/default.nix
index 3484c369db3b..4c7df4412e4f 100644
--- a/pkgs/applications/science/math/palp/default.nix
+++ b/pkgs/applications/science/math/palp/default.nix
@@ -14,13 +14,28 @@ stdenv.mkDerivation rec {
     sha256 = "1s7s2lc5f0ig1yy7ygsh3sddm3sbq4mxwybqsj8lp9wjdxs7qfrs";
   };
 
-  hardeningDisable = [ "format" ];
+  hardeningDisable = [
+    "format"
+    "strictoverflow" # causes runtime failure (tested in checkPhase)
+  ];
 
   preBuild = ''
       echo Building PALP optimized for ${dim} dimensions
       sed -i "s/^#define[^a-zA-Z]*POLY_Dmax.*/#define POLY_Dmax ${dim}/" Global.h
   '';
 
+  # palp has no tests of its own. This test is an adapted sage test that failed
+  # when #28029 was merged.
+  doCheck = true;
+  checkPhase = ''
+    ./nef.x -f -N << EOF | grep -q 'np='
+      3 6
+      1  0  0 -1  0  0
+      0  1  0  0 -1  0
+      0  0  1  0  0 -1
+    EOF
+  '';
+
   installPhase = ''
     mkdir -p "$out/bin"
     for file in poly class cws nef mori; do
@@ -62,6 +77,6 @@ stdenv.mkDerivation rec {
     # the right license.
     license = licenses.gpl2;
     maintainers = with maintainers; [ timokau ];
-    platforms = platforms.all;
+    platforms = platforms.linux;
   };
 }