about summary refs log tree commit diff
path: root/pkgs/development/lisp-modules-new/lisp-packages.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/lisp-modules-new/lisp-packages.nix')
-rw-r--r--pkgs/development/lisp-modules-new/lisp-packages.nix32
1 files changed, 8 insertions, 24 deletions
diff --git a/pkgs/development/lisp-modules-new/lisp-packages.nix b/pkgs/development/lisp-modules-new/lisp-packages.nix
index 513f72a985e0e..aebcfdb1878eb 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
@@ -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: