lispPackages_new: Fix patching without build-with-compile-into-pwd
Add patch for cffi-libffi on Darwin
This commit is contained in:
parent
ae9cb7be8c
commit
2f103f2b1f
@ -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
|
||||
@ -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:
|
||||
|
@ -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 {
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user