Switch up organization of nix shells

This commit is contained in:
Charlotte Van Petegem 2020-02-22 12:17:00 +01:00
parent 9212f3a380
commit ef53da0380
17 changed files with 1656 additions and 173 deletions

View file

@ -1,9 +1,11 @@
## NixOS config
# Setting up a new dev environment # Setting up a new dev environment
* Create a new `*.nix` file in the shells directory that describes the environment (this is the hard part). * Create a new `*.nix` file in the shells directory that describes the environment (this is the hard part).
* Execute `lorri init` in the base directory of your project. This will create a `.envrc` file and `shell.nix` file. * Execute `lorri init` in the base directory of your project. This will create a `.envrc` file and `shell.nix` file.
* Edit the `shell.nix` file to just `import /home/charlotte/.local/share/nix-shells/your-new-file.nix` * Edit the `shell.nix` file so that it contains `import /path/to/this/repo/shells/your-new-file.nix`.
* Execute `direnv allow` to load the `.envrc` file which in turn uses `lorri` to load your `shell.nix` file. * Execute `direnv allow` to load the `.envrc` file which in turn uses `lorri` to load your `shell.nix` file.

17
packages/node/default.nix Normal file
View file

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.7.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl fetchgit;
inherit nodeEnv;
}

540
packages/node/node-env.nix Normal file
View file

@ -0,0 +1,540 @@
# This file originates from node2nix
{stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile}:
let
python = if nodejs ? python then nodejs.python else python2;
# Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
tarWrapper = runCommand "tarWrapper" {} ''
mkdir -p $out/bin
cat > $out/bin/tar <<EOF
#! ${stdenv.shell} -e
$(type -p tar) "\$@" --warning=no-unknown-keyword --delay-directory-restore
EOF
chmod +x $out/bin/tar
'';
# Function that generates a TGZ file from a NPM project
buildNodeSourceDist =
{ name, version, src, ... }:
stdenv.mkDerivation {
name = "node-tarball-${name}-${version}";
inherit src;
buildInputs = [ nodejs ];
buildPhase = ''
export HOME=$TMPDIR
tgzFile=$(npm pack | tail -n 1) # Hooks to the pack command will add output (https://docs.npmjs.com/misc/scripts)
'';
installPhase = ''
mkdir -p $out/tarballs
mv $tgzFile $out/tarballs
mkdir -p $out/nix-support
echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products
'';
};
includeDependencies = {dependencies}:
stdenv.lib.optionalString (dependencies != [])
(stdenv.lib.concatMapStrings (dependency:
''
# Bundle the dependencies of the package
mkdir -p node_modules
cd node_modules
# Only include dependencies if they don't exist. They may also be bundled in the package.
if [ ! -e "${dependency.name}" ]
then
${composePackage dependency}
fi
cd ..
''
) dependencies);
# Recursively composes the dependencies of a package
composePackage = { name, packageName, src, dependencies ? [], ... }@args:
''
DIR=$(pwd)
cd $TMPDIR
unpackFile ${src}
# Make the base dir in which the target dependency resides first
mkdir -p "$(dirname "$DIR/${packageName}")"
if [ -f "${src}" ]
then
# Figure out what directory has been unpacked
packageDir="$(find . -maxdepth 1 -type d | tail -1)"
# Restore write permissions to make building work
find "$packageDir" -type d -exec chmod u+x {} \;
chmod -R u+w "$packageDir"
# Move the extracted tarball into the output folder
mv "$packageDir" "$DIR/${packageName}"
elif [ -d "${src}" ]
then
# Get a stripped name (without hash) of the source directory.
# On old nixpkgs it's already set internally.
if [ -z "$strippedName" ]
then
strippedName="$(stripHash ${src})"
fi
# Restore write permissions to make building work
chmod -R u+w "$strippedName"
# Move the extracted directory into the output folder
mv "$strippedName" "$DIR/${packageName}"
fi
# Unset the stripped name to not confuse the next unpack step
unset strippedName
# Include the dependencies of the package
cd "$DIR/${packageName}"
${includeDependencies { inherit dependencies; }}
cd ..
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
'';
pinpointDependencies = {dependencies, production}:
let
pinpointDependenciesFromPackageJSON = writeTextFile {
name = "pinpointDependencies.js";
text = ''
var fs = require('fs');
var path = require('path');
function resolveDependencyVersion(location, name) {
if(location == process.env['NIX_STORE']) {
return null;
} else {
var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json");
if(fs.existsSync(dependencyPackageJSON)) {
var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON));
if(dependencyPackageObj.name == name) {
return dependencyPackageObj.version;
}
} else {
return resolveDependencyVersion(path.resolve(location, ".."), name);
}
}
}
function replaceDependencies(dependencies) {
if(typeof dependencies == "object" && dependencies !== null) {
for(var dependency in dependencies) {
var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency);
if(resolvedVersion === null) {
process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n");
} else {
dependencies[dependency] = resolvedVersion;
}
}
}
}
/* Read the package.json configuration */
var packageObj = JSON.parse(fs.readFileSync('./package.json'));
/* Pinpoint all dependencies */
replaceDependencies(packageObj.dependencies);
if(process.argv[2] == "development") {
replaceDependencies(packageObj.devDependencies);
}
replaceDependencies(packageObj.optionalDependencies);
/* Write the fixed package.json file */
fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2));
'';
};
in
''
node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"}
${stdenv.lib.optionalString (dependencies != [])
''
if [ -d node_modules ]
then
cd node_modules
${stdenv.lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
cd ..
fi
''}
'';
# Recursively traverses all dependencies of a package and pinpoints all
# dependencies in the package.json file to the versions that are actually
# being used.
pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args:
''
if [ -d "${packageName}" ]
then
cd "${packageName}"
${pinpointDependencies { inherit dependencies production; }}
cd ..
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
fi
'';
# Extract the Node.js source code which is used to compile packages with
# native bindings
nodeSources = runCommand "node-sources" {} ''
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
mv node-* $out
'';
# Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty)
addIntegrityFieldsScript = writeTextFile {
name = "addintegrityfields.js";
text = ''
var fs = require('fs');
var path = require('path');
function augmentDependencies(baseDir, dependencies) {
for(var dependencyName in dependencies) {
var dependency = dependencies[dependencyName];
// Open package.json and augment metadata fields
var packageJSONDir = path.join(baseDir, "node_modules", dependencyName);
var packageJSONPath = path.join(packageJSONDir, "package.json");
if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored
console.log("Adding metadata fields to: "+packageJSONPath);
var packageObj = JSON.parse(fs.readFileSync(packageJSONPath));
if(dependency.integrity) {
packageObj["_integrity"] = dependency.integrity;
} else {
packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads.
}
if(dependency.resolved) {
packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided
} else {
packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories.
}
if(dependency.from !== undefined) { // Adopt from property if one has been provided
packageObj["_from"] = dependency.from;
}
fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2));
}
// Augment transitive dependencies
if(dependency.dependencies !== undefined) {
augmentDependencies(packageJSONDir, dependency.dependencies);
}
}
}
if(fs.existsSync("./package-lock.json")) {
var packageLock = JSON.parse(fs.readFileSync("./package-lock.json"));
if(packageLock.lockfileVersion !== 1) {
process.stderr.write("Sorry, I only understand lock file version 1!\n");
process.exit(1);
}
if(packageLock.dependencies !== undefined) {
augmentDependencies(".", packageLock.dependencies);
}
}
'';
};
# Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes
reconstructPackageLock = writeTextFile {
name = "addintegrityfields.js";
text = ''
var fs = require('fs');
var path = require('path');
var packageObj = JSON.parse(fs.readFileSync("package.json"));
var lockObj = {
name: packageObj.name,
version: packageObj.version,
lockfileVersion: 1,
requires: true,
dependencies: {}
};
function augmentPackageJSON(filePath, dependencies) {
var packageJSON = path.join(filePath, "package.json");
if(fs.existsSync(packageJSON)) {
var packageObj = JSON.parse(fs.readFileSync(packageJSON));
dependencies[packageObj.name] = {
version: packageObj.version,
integrity: "sha1-000000000000000000000000000=",
dependencies: {}
};
processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies);
}
}
function processDependencies(dir, dependencies) {
if(fs.existsSync(dir)) {
var files = fs.readdirSync(dir);
files.forEach(function(entry) {
var filePath = path.join(dir, entry);
var stats = fs.statSync(filePath);
if(stats.isDirectory()) {
if(entry.substr(0, 1) == "@") {
// When we encounter a namespace folder, augment all packages belonging to the scope
var pkgFiles = fs.readdirSync(filePath);
pkgFiles.forEach(function(entry) {
if(stats.isDirectory()) {
var pkgFilePath = path.join(filePath, entry);
augmentPackageJSON(pkgFilePath, dependencies);
}
});
} else {
augmentPackageJSON(filePath, dependencies);
}
}
});
}
}
processDependencies("node_modules", lockObj.dependencies);
fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2));
'';
};
prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}:
let
forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com";
in
''
# Pinpoint the versions of all dependencies to the ones that are actually being used
echo "pinpointing versions of dependencies..."
source $pinpointDependenciesScriptPath
# Patch the shebangs of the bundled modules to prevent them from
# calling executables outside the Nix store as much as possible
patchShebangs .
# Deploy the Node.js package by running npm install. Since the
# dependencies have been provided already by ourselves, it should not
# attempt to install them again, which is good, because we want to make
# it Nix's responsibility. If it needs to install any dependencies
# anyway (e.g. because the dependency parameters are
# incomplete/incorrect), it fails.
#
# The other responsibilities of NPM are kept -- version checks, build
# steps, postprocessing etc.
export HOME=$TMPDIR
cd "${packageName}"
runHook preRebuild
${stdenv.lib.optionalString bypassCache ''
${stdenv.lib.optionalString reconstructLock ''
if [ -f package-lock.json ]
then
echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!"
rm package-lock.json
else
echo "No package-lock.json file found, reconstructing..."
fi
node ${reconstructPackageLock}
''}
node ${addIntegrityFieldsScript}
''}
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
if [ "$dontNpmInstall" != "1" ]
then
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
rm -f npm-shrinkwrap.json
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
fi
'';
# Builds and composes an NPM package including all its dependencies
buildNodePackage =
{ name
, packageName
, version
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, preRebuild ? ""
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ];
in
stdenv.mkDerivation ({
name = "node_${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ stdenv.lib.optional (stdenv.isLinux) utillinux
++ stdenv.lib.optional (stdenv.isDarwin) libtool
++ buildInputs;
inherit dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
compositionScript = composePackage args;
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
installPhase = ''
# Create and enter a root node_modules/ folder
mkdir -p $out/lib/node_modules
cd $out/lib/node_modules
# Compose the package and all its dependencies
source $compositionScriptPath
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
# Create symlink to the deployed executable folder, if applicable
if [ -d "$out/lib/node_modules/.bin" ]
then
ln -s $out/lib/node_modules/.bin $out/bin
fi
# Create symlinks to the deployed manual page folders, if applicable
if [ -d "$out/lib/node_modules/${packageName}/man" ]
then
mkdir -p $out/share
for dir in "$out/lib/node_modules/${packageName}/man/"*
do
mkdir -p $out/share/man/$(basename "$dir")
for page in "$dir"/*
do
ln -s $page $out/share/man/$(basename "$dir")
done
done
fi
# Run post install hook, if provided
runHook postInstall
'';
} // extraArgs);
# Builds a development shell
buildNodeShell =
{ name
, packageName
, version
, src
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
nodeDependencies = stdenv.mkDerivation ({
name = "node-dependencies-${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ stdenv.lib.optional (stdenv.isLinux) utillinux
++ stdenv.lib.optional (stdenv.isDarwin) libtool
++ buildInputs;
inherit dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall unpackPhase buildPhase;
includeScript = includeDependencies { inherit dependencies; };
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "includeScript" "pinpointDependenciesScript" ];
installPhase = ''
mkdir -p $out/${packageName}
cd $out/${packageName}
source $includeScriptPath
# Create fake package.json to make the npm commands work properly
cp ${src}/package.json .
chmod 644 package.json
${stdenv.lib.optionalString bypassCache ''
if [ -f ${src}/package-lock.json ]
then
cp ${src}/package-lock.json .
fi
''}
# Go to the parent folder to make sure that all packages are pinpointed
cd ..
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
# Expose the executables that were installed
cd ..
${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
mv ${packageName} lib
ln -s $out/lib/node_modules/.bin $out/bin
'';
} // extraArgs);
in
stdenv.mkDerivation {
name = "node-shell-${name}-${version}";
buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
buildCommand = ''
mkdir -p $out/bin
cat > $out/bin/shell <<EOF
#! ${stdenv.shell} -e
$shellHook
exec ${stdenv.shell}
EOF
chmod +x $out/bin/shell
'';
# Provide the dependencies in a development shell through the NODE_PATH environment variable
inherit nodeDependencies;
shellHook = stdenv.lib.optionalString (dependencies != []) ''
export NODE_PATH=$nodeDependencies/lib/node_modules
export PATH="$nodeDependencies/bin:$PATH"
'';
};
in
{
buildNodeSourceDist = stdenv.lib.makeOverridable buildNodeSourceDist;
buildNodePackage = stdenv.lib.makeOverridable buildNodePackage;
buildNodeShell = stdenv.lib.makeOverridable buildNodeShell;
}

View file

@ -0,0 +1,838 @@
# This file has been generated by node2nix 1.7.0. Do not edit!
{nodeEnv, fetchurl, fetchgit, globalBuildInputs ? []}:
let
sources = {
"ansi-color-0.2.1" = {
name = "ansi-color";
packageName = "ansi-color";
version = "0.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/ansi-color/-/ansi-color-0.2.1.tgz";
sha1 = "3e75c037475217544ed763a8db5709fa9ae5bf9a";
};
};
"ansi-styles-3.2.1" = {
name = "ansi-styles";
packageName = "ansi-styles";
version = "3.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz";
sha512 = "VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==";
};
};
"any-promise-1.3.0" = {
name = "any-promise";
packageName = "any-promise";
version = "1.3.0";
src = fetchurl {
url = "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz";
sha1 = "abc6afeedcea52e809cdc0376aed3ce39635d17f";
};
};
"assertion-error-1.1.0" = {
name = "assertion-error";
packageName = "assertion-error";
version = "1.1.0";
src = fetchurl {
url = "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz";
sha512 = "jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==";
};
};
"balanced-match-1.0.0" = {
name = "balanced-match";
packageName = "balanced-match";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz";
sha1 = "89b4d199ab2bee49de164ea02b89ce462d71b767";
};
};
"brace-expansion-1.1.11" = {
name = "brace-expansion";
packageName = "brace-expansion";
version = "1.1.11";
src = fetchurl {
url = "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz";
sha512 = "iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==";
};
};
"bufrw-1.3.0" = {
name = "bufrw";
packageName = "bufrw";
version = "1.3.0";
src = fetchurl {
url = "https://registry.npmjs.org/bufrw/-/bufrw-1.3.0.tgz";
sha512 = "jzQnSbdJqhIltU9O5KUiTtljP9ccw2u5ix59McQy4pV2xGhVLhRZIndY8GIrgh5HjXa6+QJ9AQhOd2QWQizJFQ==";
};
};
"chai-4.2.0" = {
name = "chai";
packageName = "chai";
version = "4.2.0";
src = fetchurl {
url = "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz";
sha512 = "XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==";
};
};
"chai-as-promised-7.1.1" = {
name = "chai-as-promised";
packageName = "chai-as-promised";
version = "7.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz";
sha512 = "azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==";
};
};
"chalk-2.4.2" = {
name = "chalk";
packageName = "chalk";
version = "2.4.2";
src = fetchurl {
url = "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz";
sha512 = "Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==";
};
};
"check-error-1.0.2" = {
name = "check-error";
packageName = "check-error";
version = "1.0.2";
src = fetchurl {
url = "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz";
sha1 = "574d312edd88bb5dd8912e9286dd6c0aed4aac82";
};
};
"color-convert-1.9.3" = {
name = "color-convert";
packageName = "color-convert";
version = "1.9.3";
src = fetchurl {
url = "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz";
sha512 = "QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==";
};
};
"color-name-1.1.3" = {
name = "color-name";
packageName = "color-name";
version = "1.1.3";
src = fetchurl {
url = "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz";
sha1 = "a7d0558bd89c42f795dd42328f740831ca53bc25";
};
};
"command-exists-1.2.6" = {
name = "command-exists";
packageName = "command-exists";
version = "1.2.6";
src = fetchurl {
url = "https://registry.npmjs.org/command-exists/-/command-exists-1.2.6.tgz";
sha512 = "Qst/zUUNmS/z3WziPxyqjrcz09pm+2Knbs5mAZL4VAE0sSrNY1/w8+/YxeHcoBTsO6iojA6BW7eFf27Eg2MRuw==";
};
};
"commander-2.20.3" = {
name = "commander";
packageName = "commander";
version = "2.20.3";
src = fetchurl {
url = "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz";
sha512 = "GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==";
};
};
"concat-map-0.0.1" = {
name = "concat-map";
packageName = "concat-map";
version = "0.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz";
sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b";
};
};
"crypto-random-string-1.0.0" = {
name = "crypto-random-string";
packageName = "crypto-random-string";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz";
sha1 = "a230f64f568310e1498009940790ec99545bca7e";
};
};
"deep-eql-3.0.1" = {
name = "deep-eql";
packageName = "deep-eql";
version = "3.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz";
sha512 = "+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==";
};
};
"error-7.0.2" = {
name = "error";
packageName = "error";
version = "7.0.2";
src = fetchurl {
url = "https://registry.npmjs.org/error/-/error-7.0.2.tgz";
sha1 = "a5f75fff4d9926126ddac0ea5dc38e689153cb02";
};
};
"escape-string-regexp-1.0.5" = {
name = "escape-string-regexp";
packageName = "escape-string-regexp";
version = "1.0.5";
src = fetchurl {
url = "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz";
sha1 = "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4";
};
};
"fast-deep-equal-2.0.1" = {
name = "fast-deep-equal";
packageName = "fast-deep-equal";
version = "2.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz";
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
};
};
"fast-json-patch-2.2.1" = {
name = "fast-json-patch";
packageName = "fast-json-patch";
version = "2.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz";
sha512 = "4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==";
};
};
"fs-extra-7.0.1" = {
name = "fs-extra";
packageName = "fs-extra";
version = "7.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz";
sha512 = "YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==";
};
};
"fs.realpath-1.0.0" = {
name = "fs.realpath";
packageName = "fs.realpath";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz";
sha1 = "1504ad2523158caa40db4a2787cb01411994ea4f";
};
};
"get-func-name-2.0.0" = {
name = "get-func-name";
packageName = "get-func-name";
version = "2.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz";
sha1 = "ead774abee72e20409433a066366023dd6887a41";
};
};
"glob-7.1.6" = {
name = "glob";
packageName = "glob";
version = "7.1.6";
src = fetchurl {
url = "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz";
sha512 = "LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==";
};
};
"graceful-fs-4.2.3" = {
name = "graceful-fs";
packageName = "graceful-fs";
version = "4.2.3";
src = fetchurl {
url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz";
sha512 = "a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==";
};
};
"has-flag-3.0.0" = {
name = "has-flag";
packageName = "has-flag";
version = "3.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz";
sha1 = "b5d454dc2199ae225699f3467e5a07f3b955bafd";
};
};
"hexer-1.5.0" = {
name = "hexer";
packageName = "hexer";
version = "1.5.0";
src = fetchurl {
url = "https://registry.npmjs.org/hexer/-/hexer-1.5.0.tgz";
sha1 = "b86ce808598e8a9d1892c571f3cedd86fc9f0653";
};
};
"inflight-1.0.6" = {
name = "inflight";
packageName = "inflight";
version = "1.0.6";
src = fetchurl {
url = "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz";
sha1 = "49bd6331d7d02d0c09bc910a1075ba8165b56df9";
};
};
"inherits-2.0.4" = {
name = "inherits";
packageName = "inherits";
version = "2.0.4";
src = fetchurl {
url = "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz";
sha512 = "k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==";
};
};
"iterare-1.2.0" = {
name = "iterare";
packageName = "iterare";
version = "1.2.0";
src = fetchurl {
url = "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz";
sha512 = "RxMV9p/UzdK0Iplnd8mVgRvNdXlsTOiuDrqMRnDi3wIhbT+JP4xDquAX9ay13R3CH72NBzQ91KWe0+C168QAyQ==";
};
};
"jaeger-client-3.17.2" = {
name = "jaeger-client";
packageName = "jaeger-client";
version = "3.17.2";
src = fetchurl {
url = "https://registry.npmjs.org/jaeger-client/-/jaeger-client-3.17.2.tgz";
sha512 = "19YloSidmKbrXHgecLWod8eXo7rm2ieUnsfg0ripTFGRCW5v2OWE96Gte4/tOQG/8N+T39VoLU2nMBdjbdMUJg==";
};
};
"jsonfile-4.0.0" = {
name = "jsonfile";
packageName = "jsonfile";
version = "4.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz";
sha1 = "8771aae0799b64076b76640fca058f9c10e33ecb";
};
};
"lodash-4.17.15" = {
name = "lodash";
packageName = "lodash";
version = "4.17.15";
src = fetchurl {
url = "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz";
sha512 = "8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==";
};
};
"long-2.4.0" = {
name = "long";
packageName = "long";
version = "2.4.0";
src = fetchurl {
url = "https://registry.npmjs.org/long/-/long-2.4.0.tgz";
sha1 = "9fa180bb1d9500cdc29c4156766a1995e1f4524f";
};
};
"minimatch-3.0.4" = {
name = "minimatch";
packageName = "minimatch";
version = "3.0.4";
src = fetchurl {
url = "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz";
sha512 = "yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==";
};
};
"minimist-1.2.0" = {
name = "minimist";
packageName = "minimist";
version = "1.2.0";
src = fetchurl {
url = "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz";
sha1 = "a35008b20f41383eec1fb914f4cd5df79a264284";
};
};
"mz-2.7.0" = {
name = "mz";
packageName = "mz";
version = "2.7.0";
src = fetchurl {
url = "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz";
sha512 = "z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==";
};
};
"node-int64-0.4.0" = {
name = "node-int64";
packageName = "node-int64";
version = "0.4.0";
src = fetchurl {
url = "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz";
sha1 = "87a9065cdb355d3182d8f94ce11188b825c68a3b";
};
};
"object-assign-4.1.1" = {
name = "object-assign";
packageName = "object-assign";
version = "4.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz";
sha1 = "2109adc7965887cfc05cbbd442cac8bfbb360863";
};
};
"object-hash-1.3.1" = {
name = "object-hash";
packageName = "object-hash";
version = "1.3.1";
src = fetchurl {
url = "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz";
sha512 = "OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==";
};
};
"once-1.4.0" = {
name = "once";
packageName = "once";
version = "1.4.0";
src = fetchurl {
url = "https://registry.npmjs.org/once/-/once-1.4.0.tgz";
sha1 = "583b1aa775961d4b113ac17d9c50baef9dd76bd1";
};
};
"opentracing-0.13.0" = {
name = "opentracing";
packageName = "opentracing";
version = "0.13.0";
src = fetchurl {
url = "https://registry.npmjs.org/opentracing/-/opentracing-0.13.0.tgz";
sha1 = "6a341442f09d7d866bc11ed03de1e3828e3d6aab";
};
};
"opentracing-0.14.4" = {
name = "opentracing";
packageName = "opentracing";
version = "0.14.4";
src = fetchurl {
url = "https://registry.npmjs.org/opentracing/-/opentracing-0.14.4.tgz";
sha512 = "nNnZDkUNExBwEpb7LZaeMeQgvrlO8l4bgY/LvGNZCR0xG/dGWqHqjKrAmR5GUoYo0FIz38kxasvA1aevxWs2CA==";
};
};
"p-debounce-1.0.0" = {
name = "p-debounce";
packageName = "p-debounce";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/p-debounce/-/p-debounce-1.0.0.tgz";
sha1 = "cb7f2cbeefd87a09eba861e112b67527e621e2fd";
};
};
"path-is-absolute-1.0.1" = {
name = "path-is-absolute";
packageName = "path-is-absolute";
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz";
sha1 = "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f";
};
};
"pathval-1.1.0" = {
name = "pathval";
packageName = "pathval";
version = "1.1.0";
src = fetchurl {
url = "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz";
sha1 = "b942e6d4bde653005ef6b71361def8727d0645e0";
};
};
"process-0.10.1" = {
name = "process";
packageName = "process";
version = "0.10.1";
src = fetchurl {
url = "https://registry.npmjs.org/process/-/process-0.10.1.tgz";
sha1 = "842457cc51cfed72dc775afeeafb8c6034372725";
};
};
"rxjs-5.5.12" = {
name = "rxjs";
packageName = "rxjs";
version = "5.5.12";
src = fetchurl {
url = "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz";
sha512 = "xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==";
};
};
"semaphore-async-await-1.5.1" = {
name = "semaphore-async-await";
packageName = "semaphore-async-await";
version = "1.5.1";
src = fetchurl {
url = "https://registry.npmjs.org/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz";
sha1 = "857bef5e3644601ca4b9570b87e9df5ca12974fa";
};
};
"string-similarity-2.0.0" = {
name = "string-similarity";
packageName = "string-similarity";
version = "2.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/string-similarity/-/string-similarity-2.0.0.tgz";
sha512 = "62FBZrVXV5cI23bQ9L49Y4d9u9yaH61JhAwLyUFUzQbHDjdihxdfCwIherg+vylR/s4ucCddK8iKSEO7kinffQ==";
};
};
"string-template-0.2.1" = {
name = "string-template";
packageName = "string-template";
version = "0.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz";
sha1 = "42932e598a352d01fc22ec3367d9d84eec6c9add";
};
};
"supports-color-5.5.0" = {
name = "supports-color";
packageName = "supports-color";
version = "5.5.0";
src = fetchurl {
url = "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz";
sha512 = "QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==";
};
};
"symbol-observable-1.0.1" = {
name = "symbol-observable";
packageName = "symbol-observable";
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz";
sha1 = "8340fc4702c3122df5d22288f88283f513d3fdd4";
};
};
"temp-dir-1.0.0" = {
name = "temp-dir";
packageName = "temp-dir";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz";
sha1 = "0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d";
};
};
"tempy-0.2.1" = {
name = "tempy";
packageName = "tempy";
version = "0.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/tempy/-/tempy-0.2.1.tgz";
sha512 = "LB83o9bfZGrntdqPuRdanIVCPReam9SOZKW0fOy5I9X3A854GGWi0tjCqoXEk84XIEYBc/x9Hq3EFop/H5wJaw==";
};
};
"thenify-3.3.0" = {
name = "thenify";
packageName = "thenify";
version = "3.3.0";
src = fetchurl {
url = "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz";
sha1 = "e69e38a1babe969b0108207978b9f62b88604839";
};
};
"thenify-all-1.6.0" = {
name = "thenify-all";
packageName = "thenify-all";
version = "1.6.0";
src = fetchurl {
url = "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz";
sha1 = "1a1918d402d8fc3f98fbf234db0bcc8cc10e9726";
};
};
"thriftrw-3.12.0" = {
name = "thriftrw";
packageName = "thriftrw";
version = "3.12.0";
src = fetchurl {
url = "https://registry.npmjs.org/thriftrw/-/thriftrw-3.12.0.tgz";
sha512 = "4YZvR4DPEI41n4Opwr4jmrLGG4hndxr7387kzRFIIzxHQjarPusH4lGXrugvgb7TtPrfZVTpZCVe44/xUxowEw==";
};
};
"type-detect-4.0.8" = {
name = "type-detect";
packageName = "type-detect";
version = "4.0.8";
src = fetchurl {
url = "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz";
sha512 = "0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==";
};
};
"typescript-3.0.3" = {
name = "typescript";
packageName = "typescript";
version = "3.0.3";
src = fetchurl {
url = "https://registry.npmjs.org/typescript/-/typescript-3.0.3.tgz";
sha512 = "kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg==";
};
};
"unique-string-1.0.0" = {
name = "unique-string";
packageName = "unique-string";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz";
sha1 = "9e1057cca851abb93398f8b33ae187b99caec11a";
};
};
"universalify-0.1.2" = {
name = "universalify";
packageName = "universalify";
version = "0.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz";
sha512 = "rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==";
};
};
"uuid-3.4.0" = {
name = "uuid";
packageName = "uuid";
version = "3.4.0";
src = fetchurl {
url = "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz";
sha512 = "HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==";
};
};
"vscode-jsonrpc-4.0.0" = {
name = "vscode-jsonrpc";
packageName = "vscode-jsonrpc";
version = "4.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz";
sha512 = "perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==";
};
};
"vscode-jsonrpc-5.0.1" = {
name = "vscode-jsonrpc";
packageName = "vscode-jsonrpc";
version = "5.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz";
sha512 = "JvONPptw3GAQGXlVV2utDcHx0BiY34FupW/kI6mZ5x06ER5DdPG/tXWMVHjTNULF5uKPOUUD0SaXg5QaubJL0A==";
};
};
"vscode-languageserver-5.2.1" = {
name = "vscode-languageserver";
packageName = "vscode-languageserver";
version = "5.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-5.2.1.tgz";
sha512 = "GuayqdKZqAwwaCUjDvMTAVRPJOp/SLON3mJ07eGsx/Iq9HjRymhKWztX41rISqDKhHVVyFM+IywICyZDla6U3A==";
};
};
"vscode-languageserver-5.3.0-next.10" = {
name = "vscode-languageserver";
packageName = "vscode-languageserver";
version = "5.3.0-next.10";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-5.3.0-next.10.tgz";
sha512 = "QL7Fe1FT6PdLtVzwJeZ78pTic4eZbzLRy7yAQgPb9xalqqgZESR0+yDZPwJrM3E7PzOmwHBceYcJR54eQZ7Kng==";
};
};
"vscode-languageserver-protocol-3.14.1" = {
name = "vscode-languageserver-protocol";
packageName = "vscode-languageserver-protocol";
version = "3.14.1";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.14.1.tgz";
sha512 = "IL66BLb2g20uIKog5Y2dQ0IiigW0XKrvmWiOvc0yXw80z3tMEzEnHjaGAb3ENuU7MnQqgnYJ1Cl2l9RvNgDi4g==";
};
};
"vscode-languageserver-protocol-3.15.3" = {
name = "vscode-languageserver-protocol";
packageName = "vscode-languageserver-protocol";
version = "3.15.3";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.3.tgz";
sha512 = "zrMuwHOAQRhjDSnflWdJG+O2ztMWss8GqUUB8dXLR/FPenwkiBNkMIJJYfSN6sgskvsF0rHAoBowNQfbyZnnvw==";
};
};
"vscode-languageserver-types-3.14.0" = {
name = "vscode-languageserver-types";
packageName = "vscode-languageserver-types";
version = "3.14.0";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.14.0.tgz";
sha512 = "lTmS6AlAlMHOvPQemVwo3CezxBp0sNB95KNPkqp3Nxd5VFEnuG1ByM0zlRWos0zjO3ZWtkvhal0COgiV1xIA4A==";
};
};
"vscode-languageserver-types-3.15.1" = {
name = "vscode-languageserver-types";
packageName = "vscode-languageserver-types";
version = "3.15.1";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.1.tgz";
sha512 = "+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==";
};
};
"vscode-textbuffer-1.0.0" = {
name = "vscode-textbuffer";
packageName = "vscode-textbuffer";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-textbuffer/-/vscode-textbuffer-1.0.0.tgz";
sha512 = "zPaHo4urgpwsm+PrJWfNakolRpryNja18SUip/qIIsfhuEqEIPEXMxHOlFPjvDC4JgTaimkncNW7UMXRJTY6ow==";
};
};
"vscode-uri-1.0.8" = {
name = "vscode-uri";
packageName = "vscode-uri";
version = "1.0.8";
src = fetchurl {
url = "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.8.tgz";
sha512 = "obtSWTlbJ+a+TFRYGaUumtVwb+InIUVI0Lu0VBUAPmj2cU5JutEXg3xUE0c2J5Tcy7h2DEKVJBFi+Y9ZSFzzPQ==";
};
};
"wrappy-1.0.2" = {
name = "wrappy";
packageName = "wrappy";
version = "1.0.2";
src = fetchurl {
url = "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz";
sha1 = "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f";
};
};
"xorshift-0.2.1" = {
name = "xorshift";
packageName = "xorshift";
version = "0.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/xorshift/-/xorshift-0.2.1.tgz";
sha1 = "fcd82267e9351c13f0fb9c73307f25331d29c63a";
};
};
"xtend-4.0.2" = {
name = "xtend";
packageName = "xtend";
version = "4.0.2";
src = fetchurl {
url = "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz";
sha512 = "LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==";
};
};
};
in
{
javascript-typescript-langserver = nodeEnv.buildNodePackage {
name = "javascript-typescript-langserver";
packageName = "javascript-typescript-langserver";
version = "2.11.3";
src = fetchurl {
url = "https://registry.npmjs.org/javascript-typescript-langserver/-/javascript-typescript-langserver-2.11.3.tgz";
sha512 = "j2dKPq5tgSUyM2AOXWh2O7pNWzXzKI/3W02X1OrEZnV3B9yt9IM+snuGt/mk1Nryxyy7OZnhdL0XqHe4xx7Qzw==";
};
dependencies = [
sources."ansi-color-0.2.1"
sources."ansi-styles-3.2.1"
sources."any-promise-1.3.0"
sources."assertion-error-1.1.0"
sources."balanced-match-1.0.0"
sources."brace-expansion-1.1.11"
sources."bufrw-1.3.0"
sources."chai-4.2.0"
sources."chai-as-promised-7.1.1"
sources."chalk-2.4.2"
sources."check-error-1.0.2"
sources."color-convert-1.9.3"
sources."color-name-1.1.3"
sources."commander-2.20.3"
sources."concat-map-0.0.1"
sources."deep-eql-3.0.1"
sources."error-7.0.2"
sources."escape-string-regexp-1.0.5"
sources."fast-deep-equal-2.0.1"
sources."fast-json-patch-2.2.1"
sources."fs.realpath-1.0.0"
sources."get-func-name-2.0.0"
sources."glob-7.1.6"
sources."has-flag-3.0.0"
sources."hexer-1.5.0"
sources."inflight-1.0.6"
sources."inherits-2.0.4"
sources."iterare-1.2.0"
(sources."jaeger-client-3.17.2" // {
dependencies = [
sources."opentracing-0.13.0"
];
})
sources."lodash-4.17.15"
sources."long-2.4.0"
sources."minimatch-3.0.4"
sources."minimist-1.2.0"
sources."mz-2.7.0"
sources."node-int64-0.4.0"
sources."object-assign-4.1.1"
sources."object-hash-1.3.1"
sources."once-1.4.0"
sources."opentracing-0.14.4"
sources."path-is-absolute-1.0.1"
sources."pathval-1.1.0"
sources."process-0.10.1"
sources."rxjs-5.5.12"
sources."semaphore-async-await-1.5.1"
sources."string-similarity-2.0.0"
sources."string-template-0.2.1"
sources."supports-color-5.5.0"
sources."symbol-observable-1.0.1"
sources."thenify-3.3.0"
sources."thenify-all-1.6.0"
sources."thriftrw-3.12.0"
sources."type-detect-4.0.8"
sources."typescript-3.0.3"
sources."uuid-3.4.0"
sources."vscode-jsonrpc-4.0.0"
sources."vscode-languageserver-5.2.1"
(sources."vscode-languageserver-protocol-3.14.1" // {
dependencies = [
sources."vscode-languageserver-types-3.14.0"
];
})
sources."vscode-languageserver-types-3.15.1"
sources."vscode-uri-1.0.8"
sources."wrappy-1.0.2"
sources."xorshift-0.2.1"
sources."xtend-4.0.2"
];
buildInputs = globalBuildInputs;
meta = {
description = "Implementation of the Language Server Protocol for JavaScript and TypeScript";
homepage = https://github.com/sourcegraph/javascript-typescript-langserver;
license = "Apache-2.0";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
typescript-language-server = nodeEnv.buildNodePackage {
name = "typescript-language-server";
packageName = "typescript-language-server";
version = "0.4.0";
src = fetchurl {
url = "https://registry.npmjs.org/typescript-language-server/-/typescript-language-server-0.4.0.tgz";
sha512 = "K8jNOmDFn+QfrCh8ujby2pGDs5rpjYZQn+zvQnf42rxG4IHbfw5CHoMvbGkWPK/J5Gw8/l5K3i03kVZC2IBElg==";
};
dependencies = [
sources."command-exists-1.2.6"
sources."commander-2.20.3"
sources."crypto-random-string-1.0.0"
sources."fs-extra-7.0.1"
sources."graceful-fs-4.2.3"
sources."jsonfile-4.0.0"
sources."p-debounce-1.0.0"
sources."temp-dir-1.0.0"
sources."tempy-0.2.1"
sources."unique-string-1.0.0"
sources."universalify-0.1.2"
sources."vscode-jsonrpc-5.0.1"
sources."vscode-languageserver-5.3.0-next.10"
sources."vscode-languageserver-protocol-3.15.3"
sources."vscode-languageserver-types-3.15.1"
sources."vscode-textbuffer-1.0.0"
sources."vscode-uri-1.0.8"
];
buildInputs = globalBuildInputs;
meta = {
description = "Language Server Protocol (LSP) implementation for TypeScript using tsserver";
license = "Apache-2.0";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
}

View file

@ -0,0 +1,4 @@
[
"javascript-typescript-langserver",
"typescript-language-server"
]

View file

@ -12,6 +12,5 @@
}; };
}; };
services.lorri.enable = true; services.lorri.enable = true;
xdg.dataFile.nix-shells.source = ./shells;
}; };
} }

View file

@ -1,29 +0,0 @@
let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
buildInputs = [
pkgs.ffmpeg
pkgs.postgresql
pkgs.ruby_2_7
pkgs.taglib
pkgs.zlib
];
shellHook = ''
export PGDATA=$PWD/tmp/postgres_data
export PGHOST=$PWD/tmp/postgres
export PGDATABASE=postgres
export DATABASE_URL="postgresql:///postgres?host=$PGHOST"
if [ ! -d $PGHOST ]; then
mkdir -p $PGHOST
fi
if [ ! -d $PGDATA ]; then
echo 'Initializing postgresql database...'
initdb $PGDATA --auth=trust >/dev/null
fi
cat >"$PGDATA/postgresql.conf" <<HERE
listen_addresses = '''
unix_socket_directories = '$PGHOST'
HERE
'';
}

View file

@ -1,24 +0,0 @@
let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
buildInputs = with pkgs; [
ruby
yarn
nodejs-12_x
libmysqlclient
zlib
(pkgs.writeScriptBin "start-db" ''
#!${pkgs.zsh}/bin/zsh
trap "docker stop dodona-db" 0
docker run --name dodona-db -p 3306:3306 --rm -v $(git rev-parse --show-toplevel)/tmp/db:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=dodona mariadb:latest &
child=$!
wait $child
'')
];
shellHook = ''
export DATABASE_URL="mysql2://root:dodona@127.0.0.1:3306/dodona"
'';
}

View file

@ -1,116 +0,0 @@
{ pkgs, ... }:
{
customRC = ''
set autoread
"" Theming
set background=light
"" General settings
" Undo over sessions
set undofile
set undodir=~/.cache/nvimundo
" Automatically save sessions on exit and load them on start
function! MakeSession()
let b:sessiondir = $HOME . "/.config/nvim/sessions" . getcwd()
if (filewritable(b:sessiondir) != 2)
exe 'silent !mkdir -p ' b:sessiondir
redraw!
endif
let b:filename = b:sessiondir . '/session.vim'
exe "mksession! " . b:filename
endfunction
function! LoadSession()
let b:sessiondir = $HOME . "/.config/nvim/sessions" . getcwd()
let b:sessionfile = b:sessiondir . "/session.vim"
if (filereadable(b:sessionfile))
exe 'source ' b:sessionfile
else
echo "No session loaded."
endif
endfunction
if(argc() == 0)
au VimEnter * nested :call LoadSession()
endif
au VimLeave * :call MakeSession()
"" Filetype configuration
" Base settings for all files
syntax enable
set number
set showcmd
set scrolloff=8
set expandtab
set tabstop=4
set shiftwidth=4
set linebreak
set list
set listchars=tab:·\ ,trail:·
set inccommand=split
set clipboard=unnamedplus
filetype plugin indent on
"" Plugin configuration
function! s:completedFiles(winid, filename, ...) abort
bdelete!
call win_gotoid(a:winid)
if filereadable(a:filename)
let lines = readfile(a:filename)
if !empty(lines)
exe ':e ' . lines[0]
endif
call delete(a:filename)
endif
endfunction
function! FzyFiles()
let file = tempname()
let winid = win_getid()
let cmd = split(&shell) + split(&shellcmdflag) + ["${pkgs.ripgrep.out}/bin/rg --files --hidden -g '!/.git' --smart-case | ${pkgs.fzy.out}/bin/fzy > " . file]
let F = function('s:completedFiles', [winid, file])
botright 10 new
call termopen(cmd, {'on_exit': F})
startinsert
endfunction
function! s:completedGrep(winid, filename, ...) abort
bdelete!
call win_gotoid(a:winid)
if filereadable(a:filename)
let lines = readfile(a:filename)
if !empty(lines)
let list = split(lines[0], ':')
let file = list[0]
let line = list[1]
exe ':e ' . file
exe line
endif
call delete(a:filename)
endif
endfunction
function! FzyGrep()
let file = tempname()
let winid = win_getid()
let cmd = split(&shell) + split(&shellcmdflag) + ["${pkgs.ripgrep.out}/bin/rg --vimgrep --hidden -g '!/.git' '^' | ${pkgs.fzy.out}/bin/fzy > " . file]
let F = function('s:completedGrep', [winid, file])
botright 10 new
call termopen(cmd, {'on_exit': F})
startinsert
endfunction
nnoremap <C-f> :call FzyFiles()<CR>
nnoremap <C-g> :call FzyGrep()<CR>
'';
vam.knownPlugins = pkgs.vimPlugins;
vam.pluginDictionaries = [ { name = "vim-nix"; } ];
}

142
programs/neovim/base.nix Normal file
View file

@ -0,0 +1,142 @@
{ pkgs, ... }:
let
customPlugins.snow-color-theme = pkgs.vimUtils.buildVimPlugin {
name = "snow";
src = pkgs.fetchFromGitHub {
owner = "nightsense";
repo = "snow";
rev = "f9800e987e404efed4748fe8098e04ddbec9770b";
sha256 = "099fky1bpppac5785bhx1jc26gfpm8n837p8487j1rf1lwq83q33";
};
};
in
{
customRC = ''
set autoread
"" Theming
set background=light
colorscheme snow
"" General settings
" Undo over sessions
set undofile
set undodir=~/.cache/nvimundo
" Automatically save sessions on exit and load them on start
function! MakeSession()
let b:sessiondir = $HOME . "/.config/nvim/sessions" . getcwd()
if (filewritable(b:sessiondir) != 2)
exe 'silent !mkdir -p ' b:sessiondir
redraw!
endif
let b:filename = b:sessiondir . '/session.vim'
exe "mksession! " . b:filename
endfunction
function! LoadSession()
let b:sessiondir = $HOME . "/.config/nvim/sessions" . getcwd()
let b:sessionfile = b:sessiondir . "/session.vim"
if (filereadable(b:sessionfile))
exe 'source ' b:sessionfile
else
echo "No session loaded."
endif
endfunction
if(argc() == 0)
au VimEnter * nested :call LoadSession()
au VimLeave * :call MakeSession()
endif
"" Filetype configuration
" Base settings for all files
syntax enable
set number
set showcmd
set scrolloff=8
set expandtab
set tabstop=4
set shiftwidth=4
set linebreak
set list
set listchars=tab:·\ ,trail:·
set inccommand=split
set clipboard=unnamedplus
filetype plugin indent on
"" Fuzzy search in vim
function! s:completedFiles(winid, filename, ...) abort
bdelete!
call win_gotoid(a:winid)
if filereadable(a:filename)
let lines = readfile(a:filename)
if !empty(lines)
exe ':e ' . lines[0]
endif
call delete(a:filename)
endif
endfunction
function! FzyFiles()
let file = tempname()
let winid = win_getid()
let cmd = split(&shell) + split(&shellcmdflag) + ["${pkgs.ripgrep.out}/bin/rg --files --hidden -g '!/.git' --smart-case | ${pkgs.fzy.out}/bin/fzy > " . file]
let F = function('s:completedFiles', [winid, file])
botright 10 new
call termopen(cmd, {'on_exit': F})
startinsert
endfunction
function! s:completedGrep(winid, filename, ...) abort
bdelete!
call win_gotoid(a:winid)
if filereadable(a:filename)
let lines = readfile(a:filename)
if !empty(lines)
let list = split(lines[0], ':')
let file = list[0]
let line = list[1]
exe ':e ' . file
exe line
endif
call delete(a:filename)
endif
endfunction
function! FzyGrep()
let file = tempname()
let winid = win_getid()
let cmd = split(&shell) + split(&shellcmdflag) + ["${pkgs.ripgrep.out}/bin/rg --vimgrep --hidden -g '!/.git' '^' | ${pkgs.fzy.out}/bin/fzy > " . file]
let F = function('s:completedGrep', [winid, file])
botright 10 new
call termopen(cmd, {'on_exit': F})
startinsert
endfunction
nnoremap <C-f> :call FzyFiles()<CR>
nnoremap <C-g> :call FzyGrep()<CR>
"" Plugin configuration
let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'] }
let g:ale_fix_on_save = 1
'';
vam.knownPlugins = pkgs.vimPlugins // customPlugins;
vam.pluginDictionaries = [
{
names = [
"ale"
"auto-pairs"
"editorconfig-vim"
"snow-color-theme"
"vim-nix"
];
}
];
}

View file

@ -8,7 +8,7 @@ in
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {
neovim = nixpkgs-master.neovim.override { neovim = nixpkgs-master.neovim.override {
configure = (import ../direnv/shells/vim-base.nix { pkgs = self; }) ; configure = (import ./base.nix { pkgs = self; }) ;
}; };
}) })
]; ];

55
shells/accentor-api.nix Normal file
View file

@ -0,0 +1,55 @@
let
pkgs = import <nixpkgs> {};
nixpkgs-master = import <nixpkgs-master> {};
baseVimConfig = import ../programs/neovim/base.nix { inherit pkgs; };
in
pkgs.mkShell {
buildInputs = with pkgs; [
ffmpeg
postgresql
ruby_2_7
taglib
zlib
(nixpkgs-master.neovim.override {
configure = {
customRC = baseVimConfig.customRC + ''
" Required for operations modifying multiple buffers like rename
set hidden
let g:deoplete#enable_at_startup = 1
let g:LanguageClient_serverCommands = {
\ 'ruby': ['${solargraph}/bin/solargraph', 'stdio'],
\ }
'';
vam.knownPlugins = baseVimConfig.vam.knownPlugins;
vam.pluginDictionaries = (baseVimConfig.vam.pluginDictionaries or []) ++ [
{
names = [
"deoplete-nvim"
"LanguageClient-neovim"
"vim-ruby"
];
}
];
};
})
];
shellHook = ''
export PGDATA=$PWD/tmp/postgres_data
export PGHOST=$PWD/tmp/postgres
export PGDATABASE=postgres
export DATABASE_URL="postgresql:///postgres?host=$PGHOST"
if [ ! -d $PGHOST ]; then
mkdir -p $PGHOST
fi
if [ ! -d $PGDATA ]; then
echo 'Initializing postgresql database...'
initdb $PGDATA --auth=trust >/dev/null
fi
cat >"$PGDATA/postgresql.conf" <<HERE
listen_addresses = '''
unix_socket_directories = '$PGHOST'
HERE
'';
}

54
shells/dodona.nix Normal file
View file

@ -0,0 +1,54 @@
let
pkgs = import <nixpkgs> {};
nixpkgs-master = import <nixpkgs-master> {};
baseVimConfig = import ../programs/neovim/base.nix { inherit pkgs; };
nodePackages = import ../packages/node/default.nix { inherit pkgs; };
in
pkgs.mkShell {
buildInputs = with pkgs; [
ruby
yarn
nodejs-12_x
libmysqlclient
zlib
(pkgs.writeScriptBin "start-db" ''
#!${pkgs.zsh}/bin/zsh
trap "docker stop dodona-db" 0
docker run --name dodona-db -p 3306:3306 --rm -v dodona-db-data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=dodona mariadb:latest &
child=$!
wait $child
'')
(nixpkgs-master.neovim.override {
configure = {
customRC = baseVimConfig.customRC + ''
" Required for operations modifying multiple buffers like rename
set hidden
let g:deoplete#enable_at_startup = 1
let g:LanguageClient_serverCommands = {
\ 'ruby': ['${solargraph}/bin/solargraph', 'stdio'],
\ 'javascript': ['${nodePackages.javascript-typescript-langserver}/bin/javascript-typescript-stdio'],
\ 'typescript': ['${nodePackages.typescript-language-server}/bin/typescript-language-server', '--stdio'],
\ }
'';
vam.knownPlugins = baseVimConfig.vam.knownPlugins;
vam.pluginDictionaries = (baseVimConfig.vam.pluginDictionaries or []) ++ [
{
names = [
"deoplete-nvim"
"LanguageClient-neovim"
"vim-ruby"
"yats-vim"
];
}
];
};
})
];
shellHook = ''
export DATABASE_URL="mysql2://root:dodona@127.0.0.1:3306/dodona"
'';
}

View file

@ -1,13 +1,14 @@
let let
pkgs = import <nixpkgs> {}; pkgs = import <nixpkgs> {};
nixpkgs-master = import <nixpkgs-master> {}; nixpkgs-master = import <nixpkgs-master> {};
baseVimConfig = import ./vim-base.nix { inherit pkgs; }; baseVimConfig = import ../programs/neovim/base.nix { inherit pkgs; };
in in
pkgs.mkShell { pkgs.mkShell {
buildInputs = with nixpkgs-master; [ buildInputs = with nixpkgs-master; [
(neovim.override { (neovim.override {
configure = { configure = {
customRC = baseVimConfig.customRC; customRC = baseVimConfig.customRC;
vam.knownPlugins = baseVimConfig.vam.knownPlugins;
vam.pluginDictionaries = (baseVimConfig.vam.pluginDictionaries or []) ++ [ { name = "vim-ledger"; } ]; vam.pluginDictionaries = (baseVimConfig.vam.pluginDictionaries or []) ++ [ { name = "vim-ledger"; } ];
}; };
}) })