summary refs log tree commit diff
path: root/pkgs/development/lisp-modules
diff options
context:
space:
mode:
authorKasper Gałkowski <k@galkowski.xyz>2023-03-10 20:13:54 +0100
committerKasper Gałkowski <k@galkowski.xyz>2023-03-10 20:13:54 +0100
commit653ba458347e33ce31fce1c7402678bcdb5bed87 (patch)
tree244f645e6a83511b878709c8ee2d2ae08eb05118 /pkgs/development/lisp-modules
parenta0bdaf345b4e38eabc7d6df8f48c440323b4b373 (diff)
downloadnixpkgs-653ba458347e33ce31fce1c7402678bcdb5bed87.tar
nixpkgs-653ba458347e33ce31fce1c7402678bcdb5bed87.tar.gz
nixpkgs-653ba458347e33ce31fce1c7402678bcdb5bed87.tar.bz2
nixpkgs-653ba458347e33ce31fce1c7402678bcdb5bed87.tar.lz
nixpkgs-653ba458347e33ce31fce1c7402678bcdb5bed87.tar.xz
nixpkgs-653ba458347e33ce31fce1c7402678bcdb5bed87.tar.zst
nixpkgs-653ba458347e33ce31fce1c7402678bcdb5bed87.zip
sbclPackages.math: fix build
There was a compile-time pathname into the home directory. It was patched to be
a function that works on run-time.
Diffstat (limited to 'pkgs/development/lisp-modules')
-rw-r--r--pkgs/development/lisp-modules/import/database/sqlite.lisp1
-rw-r--r--pkgs/development/lisp-modules/imported.nix3
-rw-r--r--pkgs/development/lisp-modules/patches/math-no-compile-time-directory.patch32
-rw-r--r--pkgs/development/lisp-modules/ql.nix4
4 files changed, 36 insertions, 4 deletions
diff --git a/pkgs/development/lisp-modules/import/database/sqlite.lisp b/pkgs/development/lisp-modules/import/database/sqlite.lisp
index 33339cb017a..c25c5c7d47c 100644
--- a/pkgs/development/lisp-modules/import/database/sqlite.lisp
+++ b/pkgs/development/lisp-modules/import/database/sqlite.lisp
@@ -85,7 +85,6 @@ in lib.makeScope pkgs.newScope (self: {")
    "hu.dwim.quasi-quote"
    ;; Tries to write in $HOME
    "ubiquitous"
-   "math"
    ;; Upstream bad packaging, multiple systems in clml.blas.asd
    "clml.blas.hompack"
    ;; Fails on SBCL due to heap exhaustion
diff --git a/pkgs/development/lisp-modules/imported.nix b/pkgs/development/lisp-modules/imported.nix
index 6ad57d9f284..f830383bcc5 100644
--- a/pkgs/development/lisp-modules/imported.nix
+++ b/pkgs/development/lisp-modules/imported.nix
@@ -39439,9 +39439,6 @@ in lib.makeScope pkgs.newScope (self: {
     });
     systems = [ "math" ];
     lispLibs = [ (getAttr "cl-utilities" self) (getAttr "font-discovery" self) (getAttr "gsll" self) (getAttr "vgplot" self) ];
-    meta = {
-      broken = true;
-    };
   });
   mathkit = (build-asdf-system {
     pname = "mathkit";
diff --git a/pkgs/development/lisp-modules/patches/math-no-compile-time-directory.patch b/pkgs/development/lisp-modules/patches/math-no-compile-time-directory.patch
new file mode 100644
index 00000000000..7d16ee4cec3
--- /dev/null
+++ b/pkgs/development/lisp-modules/patches/math-no-compile-time-directory.patch
@@ -0,0 +1,32 @@
+--- a/src/gnuplot/gnuplot.lisp
++++ b/src/gnuplot/gnuplot.lisp
+@@ -24,8 +24,13 @@
+ 
+ (in-package :math/gnuplot)
+ 
+-(defparameter *default-gnuplot-direcroty*
+-  (ensure-directories-exist #P"~/gnuplot/"))
++
++
++(defun default-gnuplot-directory ()
++  (let ((directory (merge-pathnames
++                    (make-pathname :directory '(:relative "gnuplot"))
++                    (user-homedir-pathname))))
++    (ensure-directories-exist directory)))
+ 
+ ;;;; (directory-namestring *default-gnuplot-direcroty*)
+ 
+@@ -33,9 +38,9 @@
+   (assert (stringp f-name))
+   (assert (stringp f-ext))
+   (if (string= "" f-ext)
+-      (concatenate 'string (directory-namestring *default-gnuplot-direcroty*)
++      (concatenate 'string (directory-namestring (default-gnuplot-directory))
+                    f-name f-ext)
+-      (concatenate 'string (directory-namestring *default-gnuplot-direcroty*)
++      (concatenate 'string (directory-namestring (default-gnuplot-directory))
+                    f-name "." f-ext)))
+ 
+ (defun find-font-family (&key (family "Times New Roman"))
+
+Diff finished.  Fri Mar 10 20:05:26 2023
\ No newline at end of file
diff --git a/pkgs/development/lisp-modules/ql.nix b/pkgs/development/lisp-modules/ql.nix
index 81b23782222..40b0956d38d 100644
--- a/pkgs/development/lisp-modules/ql.nix
+++ b/pkgs/development/lisp-modules/ql.nix
@@ -199,6 +199,10 @@ let
     hu_dot_dwim_dot_graphviz = super.hu_dot_dwim_dot_graphviz.overrideLispAttrs (o: {
       nativeLibs = [ pkgs.graphviz ];
     });
+    math = super.math.overrideLispAttrs (o: {
+      patches = [ ./patches/math-no-compile-time-directory.patch ];
+      nativeLibs = [ pkgs.fontconfig ];
+    });
   });
 
   qlpkgs =