Commit b1a6d54b authored by Jörg Thalheim's avatar Jörg Thalheim
Browse files

zls: fix build by moving dep linking to postConfigure

Commit e20232ea moved ZIG_GLOBAL_CACHE_DIR setup from an
addEnvHooks call (which ran before all phases) into zigConfigurePhase.
This broke zls because $ZIG_GLOBAL_CACHE_DIR was unset during
postPatch, causing `ln -s ... /p` (Permission denied).

Move the symlink creation to postConfigure where the variable is now
available.
parent 98bfdf1e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ lib.mapAttrs (_: extension: stdenv.mkDerivation (lib.extends common extension))

    nativeBuildInputs = [ zig_0_14 ];

    postPatch = ''
    postConfigure = ''
      ln -s ${callPackage ./deps_0_14.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
    '';
  };
@@ -58,7 +58,7 @@ lib.mapAttrs (_: extension: stdenv.mkDerivation (lib.extends common extension))

    nativeBuildInputs = [ zig_0_15 ];

    postPatch = ''
    postConfigure = ''
      ln -s ${callPackage ./deps_0_15.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
    '';
  };