Merge #200573: lispPackages_new: fix a bunch of packages

...into staging-next
This commit is contained in:
Vladimír Čunát 2022-11-13 16:44:48 +01:00
commit f3da70ce14
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
5 changed files with 72 additions and 24 deletions

View File

@ -133,10 +133,6 @@ let
in stdenv.mkDerivation (rec {
inherit pname version nativeLibs javaLibs lispLibs lisp systems asds;
src = if builtins.length patches > 0
then apply-patches args
else args.src;
# When src is null, we are building a lispWithPackages and only
# want to make use of the dependency environment variables
# generated by build-asdf-system
@ -201,7 +197,7 @@ let
#
# NOTE: It's important to read files from `src` instead of
# from pwd to get go-to-definition working with SLIME
export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:${src}//
export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$src//
# Similiarily for native deps
export LD_LIBRARY_PATH=${makeLibraryPath nativeLibs}:$LD_LIBRARY_PATH
@ -209,7 +205,7 @@ let
# Make asdf compile from `src` to pwd and load `lispLibs`
# from storeDir. Otherwise it could try to recompile lisp deps.
export ASDF_OUTPUT_TRANSLATIONS="${src}:$(pwd):${storeDir}:${storeDir}"
export ASDF_OUTPUT_TRANSLATIONS="$src:$(pwd):${storeDir}:${storeDir}"
# track lisp dependencies for graph generation
# TODO: Do the propagation like for lisp, native and java like this:
@ -248,24 +244,12 @@ let
dontStrip = true;
dontFixup = true;
} // args));
# Need to do that because we always want to compile straight from
# `src` for go-to-definition to work in SLIME.
apply-patches = { patches, src, ... }:
stdenv.mkDerivation {
inherit patches src;
pname = "source";
version = "patched";
dontConfigure = true;
dontBuild = true;
dontStrip = true;
dontFixup = true;
installPhase = ''
mkdir -pv $out
cp -r * $out
'';
};
} // (args // {
src = if builtins.length (args.patches or []) > 0
then pkgs.applyPatches { inherit (args) src patches; }
else args.src;
patches = [];
})));
# Build the set of lisp packages using `lisp`
# These packages are defined manually for one reason or another:

View File

@ -102,6 +102,7 @@ let
url = "https://github.com/cffi/cffi/archive/3f842b92ef808900bf20dae92c2d74232c2f6d3a.tar.gz";
sha256 = "1jilvmbbfrmb23j07lwmkbffc6r35wnvas5s4zjc84i856ccclm2";
};
patches = [ ./patches/cffi-libffi-darwin-ffi-h.patch ];
});
cl-unicode = build-with-compile-into-pwd {
@ -423,6 +424,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

View File

@ -0,0 +1,14 @@
--- a/libffi/libffi-types.lisp
+++ b/libffi/libffi-types.lisp
@@ -43,9 +43,6 @@
(pkg-config-cflags "libffi" :optional t)
-#+darwin
-(include "ffi/ffi.h")
-#-darwin
(include "ffi.h")
(cenum status
Diff finished. Sun Nov 13 00:23:10 2022

View File

@ -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

View File

@ -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 =