From ae9cb7be8c3b5a3edfd90eff8734861ae89f7df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Ga=C5=82kowski?= Date: Tue, 11 Oct 2022 17:41:55 +0200 Subject: [PATCH] lispPackages_new: fixed a bunch of packages magicl, cl-cairo2, cl-ana, gsll, cl-libyaml, cl-libxml2, cl-readline --- .../development/lisp-modules-new/packages.nix | 7 +++++++ .../magicl-dont-build-fortran-twice.patch | 21 +++++++++++++++++++ pkgs/development/lisp-modules-new/ql.nix | 21 +++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 pkgs/development/lisp-modules-new/patches/magicl-dont-build-fortran-twice.patch diff --git a/pkgs/development/lisp-modules-new/packages.nix b/pkgs/development/lisp-modules-new/packages.nix index 1ad06f615b56..3dee2b19231b 100644 --- a/pkgs/development/lisp-modules-new/packages.nix +++ b/pkgs/development/lisp-modules-new/packages.nix @@ -423,6 +423,13 @@ let patches = [ ./patches/qtools-use-nix-libs.patch ]; }; + magicl = build-with-compile-into-pwd { + inherit (ql.magicl) pname version src lispLibs; + nativeBuildInputs = [ pkgs.gfortran ]; + nativeLibs = [ pkgs.openblas ]; + patches = [ ./patches/magicl-dont-build-fortran-twice.patch ]; + }; + }; in packages diff --git a/pkgs/development/lisp-modules-new/patches/magicl-dont-build-fortran-twice.patch b/pkgs/development/lisp-modules-new/patches/magicl-dont-build-fortran-twice.patch new file mode 100644 index 000000000000..f63b6949b1fd --- /dev/null +++ b/pkgs/development/lisp-modules-new/patches/magicl-dont-build-fortran-twice.patch @@ -0,0 +1,21 @@ +--- a/magicl.asd ++++ b/magicl.asd +@@ -143,6 +143,7 @@ + (shared-object (make-pathname :type #+darwin "dylib" #-darwin "so" + :name "libexpokit" + :defaults fortran-file))) ++ (unless (probe-file (nn shared-object)) + (uiop:run-program + (list "gfortran" "-fPIC" "-std=legacy" + "-c" +@@ -155,7 +156,7 @@ + (nn object-file) + #+darwin "-lblas" + #+darwin "-llapack")) +- (delete-file object-file)))) ++ (delete-file object-file))))) + + + (asdf:defsystem #:magicl/ext-expokit + +Diff finished. Mon Oct 10 22:03:54 2022 diff --git a/pkgs/development/lisp-modules-new/ql.nix b/pkgs/development/lisp-modules-new/ql.nix index 4ffce7a8d769..8e281f6b2c59 100644 --- a/pkgs/development/lisp-modules-new/ql.nix +++ b/pkgs/development/lisp-modules-new/ql.nix @@ -19,6 +19,9 @@ let cl-cffi-gtk-cairo = pkg: { nativeLibs = [ cairo ]; }; + cl-cairo2 = pkg: { + nativeLibs = [ cairo ]; + }; cl-cffi-gtk-gdk = pkg: { nativeLibs = [ gtk3 ]; }; @@ -130,6 +133,24 @@ let nativeLibs = [ libfixposix ]; systems = [ "iolib" "iolib/os" "iolib/pathnames" ]; }; + "cl-ana.hdf-cffi" = pkg: { + nativeBuildInputs = [ hdf5 ]; + nativeLibs = [ hdf5 ]; + NIX_LDFLAGS = [ "-lhdf5" ]; + }; + gsll = pkg: { + nativeBuildInputs = [ gsl ]; + nativeLibs = [ gsl ]; + }; + cl-libyaml = pkg: { + nativeLibs = [ libyaml ]; + }; + cl-libxml2 = pkg: { + nativeLibs = [ libxml2 ]; + }; + cl-readline = pkg: { + nativeLibs = [ readline ]; + }; }; qlpkgs =