Update custom packages

This commit is contained in:
Charlotte Van Petegem 2020-05-06 15:57:54 +02:00
parent 43cb5b4932
commit 0e0b85b060
4 changed files with 962 additions and 1403 deletions

View file

@ -2,10 +2,10 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "jdtls"; pname = "jdtls";
version = "0.50.0"; version = "0.55.0";
src = pkgs.fetchurl { src = pkgs.fetchurl {
url = "http://download.eclipse.org/${pname}/milestones/${version}/jdt-language-server-${version}-202002171858.tar.gz"; url = "http://download.eclipse.org/${pname}/milestones/${version}/jdt-language-server-${version}-202004300028.tar.gz";
sha256 = "bf72084dc7988f76e01668d778c826c7490c287ee96a9f82e9e11afb6b722ab7"; sha256 = "0kxx4l7yqvzxbcb0j8yvrpvq6rba50j173dl71p4kqz14878m17w";
}; };
sourceRoot = "."; sourceRoot = ".";
buildPhase = "true"; buildPhase = "true";

View file

@ -1,4 +1,4 @@
# This file has been generated by node2nix 1.7.0. Do not edit! # This file has been generated by node2nix 1.8.0. Do not edit!
{ pkgs ? import <nixpkgs> { { pkgs ? import <nixpkgs> {
inherit system; inherit system;

View file

@ -37,10 +37,8 @@ let
}; };
includeDependencies = { dependencies }: includeDependencies = { dependencies }:
stdenv.lib.optionalString (dependencies != [ ]) stdenv.lib.optionalString (dependencies != [ ])
( (stdenv.lib.concatMapStrings
stdenv.lib.concatMapStrings (dependency:
(
dependency:
'' ''
# Bundle the dependencies of the package # Bundle the dependencies of the package
mkdir -p node_modules mkdir -p node_modules
@ -54,12 +52,11 @@ let
cd .. cd ..
'' ''
) dependencies ) dependencies);
);
# Recursively composes the dependencies of a package # Recursively composes the dependencies of a package
composePackage = { name, packageName, src, dependencies ? [ ], ... }@args: composePackage = { name, packageName, src, dependencies ? [ ], ... }@args:
'' builtins.addErrorContext "while evaluating node package '${packageName}'" ''
DIR=$(pwd) DIR=$(pwd)
cd $TMPDIR cd $TMPDIR
@ -362,7 +359,7 @@ let
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
if [ "$dontNpmInstall" != "1" ] if [ "''${dontNpmInstall-}" != "1" ]
then then
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used. # NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
rm -f npm-shrinkwrap.json rm -f npm-shrinkwrap.json
@ -393,14 +390,15 @@ let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ]; extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ];
in in
stdenv.mkDerivation stdenv.mkDerivation
( ({
{
name = "node_${name}-${version}"; name = "node_${name}-${version}";
buildInputs = [ tarWrapper python nodejs ] buildInputs = [ tarWrapper python nodejs ]
++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ stdenv.lib.optional (stdenv.isLinux) utillinux
++ stdenv.lib.optional (stdenv.isDarwin) libtool ++ stdenv.lib.optional (stdenv.isDarwin) libtool
++ buildInputs; ++ buildInputs;
inherit nodejs;
inherit dontStrip; # Stripping may fail a build for some package deployments inherit dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall preRebuild unpackPhase buildPhase; inherit dontNpmInstall preRebuild unpackPhase buildPhase;
@ -442,8 +440,7 @@ let
# Run post install hook, if provided # Run post install hook, if provided
runHook postInstall runHook postInstall
''; '';
} // extraArgs } // extraArgs);
);
# Builds a development shell # Builds a development shell
buildNodeShell = buildNodeShell =
@ -466,8 +463,7 @@ let
let let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ]; extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
nodeDependencies = stdenv.mkDerivation nodeDependencies = stdenv.mkDerivation
( ({
{
name = "node-dependencies-${name}-${version}"; name = "node-dependencies-${name}-${version}";
buildInputs = [ tarWrapper python nodejs ] buildInputs = [ tarWrapper python nodejs ]
@ -512,8 +508,7 @@ let
mv ${packageName} lib mv ${packageName} lib
ln -s $out/lib/node_modules/.bin $out/bin ln -s $out/lib/node_modules/.bin $out/bin
''; '';
} // extraArgs } // extraArgs);
);
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "node-shell-${name}-${version}"; name = "node-shell-${name}-${version}";
@ -532,8 +527,8 @@ let
# Provide the dependencies in a development shell through the NODE_PATH environment variable # Provide the dependencies in a development shell through the NODE_PATH environment variable
inherit nodeDependencies; inherit nodeDependencies;
shellHook = stdenv.lib.optionalString (dependencies != [ ]) '' shellHook = stdenv.lib.optionalString (dependencies != [ ]) ''
export NODE_PATH=$nodeDependencies/lib/node_modules export NODE_PATH=${nodeDependencies}/lib/node_modules
export PATH="$nodeDependencies/bin:$PATH" export PATH="${nodeDependencies}/bin:$PATH"
''; '';
}; };
in in

File diff suppressed because it is too large Load diff