diff --git a/pkgs/development/lisp-modules-new/lisp-packages.nix b/pkgs/development/lisp-modules-new/lisp-packages.nix index 513f72a985e0..913296e9fce3 100644 --- a/pkgs/development/lisp-modules-new/lisp-packages.nix +++ b/pkgs/development/lisp-modules-new/lisp-packages.nix @@ -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: diff --git a/pkgs/development/lisp-modules-new/packages.nix b/pkgs/development/lisp-modules-new/packages.nix index 3dee2b19231b..244d2f4b5b5f 100644 --- a/pkgs/development/lisp-modules-new/packages.nix +++ b/pkgs/development/lisp-modules-new/packages.nix @@ -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 { diff --git a/pkgs/development/lisp-modules-new/patches/cffi-libffi-darwin-ffi-h.patch b/pkgs/development/lisp-modules-new/patches/cffi-libffi-darwin-ffi-h.patch new file mode 100644 index 000000000000..15c4a4588755 --- /dev/null +++ b/pkgs/development/lisp-modules-new/patches/cffi-libffi-darwin-ffi-h.patch @@ -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 \ No newline at end of file