diff options
author | Kasper Gałkowski <k@galkowski.xyz> | 2022-11-13 13:34:39 +0100 |
---|---|---|
committer | Kasper Gałkowski <k@galkowski.xyz> | 2022-11-13 13:34:39 +0100 |
commit | 2f103f2b1f4a9cd20fe00e331f1177cf31086f26 (patch) | |
tree | 9586bf16b9880290c8a3c74e775d6fc724d896f9 /pkgs/development/lisp-modules-new | |
parent | ae9cb7be8c3b5a3edfd90eff8734861ae89f7df8 (diff) |
lispPackages_new: Fix patching without build-with-compile-into-pwd
Add patch for cffi-libffi on Darwin
Diffstat (limited to 'pkgs/development/lisp-modules-new')
3 files changed, 21 insertions, 22 deletions
diff --git a/pkgs/development/lisp-modules-new/lisp-packages.nix b/pkgs/development/lisp-modules-new/lisp-packages.nix index 513f72a985e0e..913296e9fce37 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 3dee2b19231b2..244d2f4b5b5f0 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 0000000000000..15c4a45887550 --- /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 |