Merge #200573: lispPackages_new: fix a bunch of packages

...into staging-next

+72 -24
+8 -24
pkgs/development/lisp-modules-new/lisp-packages.nix
··· 133 133 in stdenv.mkDerivation (rec { 134 134 inherit pname version nativeLibs javaLibs lispLibs lisp systems asds; 135 135 136 - src = if builtins.length patches > 0 137 - then apply-patches args 138 - else args.src; 139 - 140 136 # When src is null, we are building a lispWithPackages and only 141 137 # want to make use of the dependency environment variables 142 138 # generated by build-asdf-system ··· 201 197 # 202 198 # NOTE: It's important to read files from `src` instead of 203 199 # from pwd to get go-to-definition working with SLIME 204 - export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:${src}// 200 + export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$src// 205 201 206 202 # Similiarily for native deps 207 203 export LD_LIBRARY_PATH=${makeLibraryPath nativeLibs}:$LD_LIBRARY_PATH ··· 209 205 210 206 # Make asdf compile from `src` to pwd and load `lispLibs` 211 207 # from storeDir. Otherwise it could try to recompile lisp deps. 212 - export ASDF_OUTPUT_TRANSLATIONS="${src}:$(pwd):${storeDir}:${storeDir}" 208 + export ASDF_OUTPUT_TRANSLATIONS="$src:$(pwd):${storeDir}:${storeDir}" 213 209 214 210 # track lisp dependencies for graph generation 215 211 # TODO: Do the propagation like for lisp, native and java like this: ··· 248 244 dontStrip = true; 249 245 dontFixup = true; 250 246 251 - } // args)); 252 - 253 - # Need to do that because we always want to compile straight from 254 - # `src` for go-to-definition to work in SLIME. 255 - apply-patches = { patches, src, ... }: 256 - stdenv.mkDerivation { 257 - inherit patches src; 258 - pname = "source"; 259 - version = "patched"; 260 - dontConfigure = true; 261 - dontBuild = true; 262 - dontStrip = true; 263 - dontFixup = true; 264 - installPhase = '' 265 - mkdir -pv $out 266 - cp -r * $out 267 - ''; 268 - }; 247 + } // (args // { 248 + src = if builtins.length (args.patches or []) > 0 249 + then pkgs.applyPatches { inherit (args) src patches; } 250 + else args.src; 251 + patches = []; 252 + }))); 269 253 270 254 # Build the set of lisp packages using `lisp` 271 255 # These packages are defined manually for one reason or another:
+8
pkgs/development/lisp-modules-new/packages.nix
··· 102 102 url = "https://github.com/cffi/cffi/archive/3f842b92ef808900bf20dae92c2d74232c2f6d3a.tar.gz"; 103 103 sha256 = "1jilvmbbfrmb23j07lwmkbffc6r35wnvas5s4zjc84i856ccclm2"; 104 104 }; 105 + patches = [ ./patches/cffi-libffi-darwin-ffi-h.patch ]; 105 106 }); 106 107 107 108 cl-unicode = build-with-compile-into-pwd { ··· 421 422 inherit (ql.qtools) pname version src nativeLibs; 422 423 lispLibs = [ qt ] ++ remove ql.qt_plus_libs ql.qtools.lispLibs ++ [ qt-libs ]; 423 424 patches = [ ./patches/qtools-use-nix-libs.patch ]; 425 + }; 426 + 427 + magicl = build-with-compile-into-pwd { 428 + inherit (ql.magicl) pname version src lispLibs; 429 + nativeBuildInputs = [ pkgs.gfortran ]; 430 + nativeLibs = [ pkgs.openblas ]; 431 + patches = [ ./patches/magicl-dont-build-fortran-twice.patch ]; 424 432 }; 425 433 426 434 };
+14
pkgs/development/lisp-modules-new/patches/cffi-libffi-darwin-ffi-h.patch
··· 1 + --- a/libffi/libffi-types.lisp 2 + +++ b/libffi/libffi-types.lisp 3 + @@ -43,9 +43,6 @@ 4 + 5 + (pkg-config-cflags "libffi" :optional t) 6 + 7 + -#+darwin 8 + -(include "ffi/ffi.h") 9 + -#-darwin 10 + (include "ffi.h") 11 + 12 + (cenum status 13 + 14 + Diff finished. Sun Nov 13 00:23:10 2022
+21
pkgs/development/lisp-modules-new/patches/magicl-dont-build-fortran-twice.patch
··· 1 + --- a/magicl.asd 2 + +++ b/magicl.asd 3 + @@ -143,6 +143,7 @@ 4 + (shared-object (make-pathname :type #+darwin "dylib" #-darwin "so" 5 + :name "libexpokit" 6 + :defaults fortran-file))) 7 + + (unless (probe-file (nn shared-object)) 8 + (uiop:run-program 9 + (list "gfortran" "-fPIC" "-std=legacy" 10 + "-c" 11 + @@ -155,7 +156,7 @@ 12 + (nn object-file) 13 + #+darwin "-lblas" 14 + #+darwin "-llapack")) 15 + - (delete-file object-file)))) 16 + + (delete-file object-file))))) 17 + 18 + 19 + (asdf:defsystem #:magicl/ext-expokit 20 + 21 + Diff finished. Mon Oct 10 22:03:54 2022
+21
pkgs/development/lisp-modules-new/ql.nix
··· 19 19 cl-cffi-gtk-cairo = pkg: { 20 20 nativeLibs = [ cairo ]; 21 21 }; 22 + cl-cairo2 = pkg: { 23 + nativeLibs = [ cairo ]; 24 + }; 22 25 cl-cffi-gtk-gdk = pkg: { 23 26 nativeLibs = [ gtk3 ]; 24 27 }; ··· 129 132 nativeBuildInputs = [ libfixposix ]; 130 133 nativeLibs = [ libfixposix ]; 131 134 systems = [ "iolib" "iolib/os" "iolib/pathnames" ]; 135 + }; 136 + "cl-ana.hdf-cffi" = pkg: { 137 + nativeBuildInputs = [ hdf5 ]; 138 + nativeLibs = [ hdf5 ]; 139 + NIX_LDFLAGS = [ "-lhdf5" ]; 140 + }; 141 + gsll = pkg: { 142 + nativeBuildInputs = [ gsl ]; 143 + nativeLibs = [ gsl ]; 144 + }; 145 + cl-libyaml = pkg: { 146 + nativeLibs = [ libyaml ]; 147 + }; 148 + cl-libxml2 = pkg: { 149 + nativeLibs = [ libxml2 ]; 150 + }; 151 + cl-readline = pkg: { 152 + nativeLibs = [ readline ]; 132 153 }; 133 154 }; 134 155