python3.pkgs.panel: fix package by switching to prebuilt wheel

This package is difficult to upgrade because of the nodejs modules
needed.
This commit is contained in:
Frederik Rietdijk 2022-02-25 13:36:54 +01:00
parent e562efeff6
commit e67331103e
5 changed files with 10 additions and 1206 deletions

View File

@ -9,39 +9,22 @@
, pyct
, testpath
, tqdm
, callPackage
, nodejs
}:
let
node = callPackage ./node { };
in
buildPythonPackage rec {
pname = "panel";
version = "0.12.6";
# Don't forget to also update the node packages
# 1. retrieve the package.json file
# 2. nix shell nixpkgs#nodePackages.node2nix
# 3. node2nix
src = fetchPypi {
inherit pname version;
sha256 = "97e158e8eb941f88d71929407f9455c903b5e18d89969db8ce8af66036f46b53";
};
format = "wheel";
# Since 0.10.0 panel attempts to fetch from the web.
# We avoid this:
# - we use node2nix to fetch assets
# - we disable bundling (which also tries to fetch assets)
# Downside of disabling bundling is that in an airgapped environment
# one may miss assets.
# https://github.com/holoviz/panel/issues/1819
preBuild = ''
substituteInPlace setup.py --replace "bundle_resources()" ""
pushd panel
ln -s ${node.nodeDependencies}/lib/node_modules
export PATH="${node.nodeDependencies}/bin:$PATH"
popd
'';
# We fetch a wheel because while we can fetch the node
# artifacts using npm, the bundling invoked in setup.py
# tries to fetch even more artifacts
src = fetchPypi {
inherit pname version format;
hash = "sha256-ARAbBM0QYZlZqV51lMRoEZEQH1jlHRhlon3nfTi7dnM=";
};
propagatedBuildInputs = [
bleach
@ -58,7 +41,7 @@ buildPythonPackage rec {
doCheck = false;
passthru = {
inherit node; # For convenience
inherit nodejs; # For convenience
};
meta = with lib; {

View File

@ -1,17 +0,0 @@
# This file has been generated by node2nix 1.9.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 lib python2 runCommand writeTextFile;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View File

@ -1,573 +0,0 @@
# This file originates from node2nix
{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile}:
let
# Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master
utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux;
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}:
lib.optionalString (dependencies != [])
(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:
builtins.addErrorContext "while evaluating node package '${packageName}'" ''
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 ..
${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"}
${lib.optionalString (dependencies != [])
''
if [ -d node_modules ]
then
cd node_modules
${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 ..
${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(![1, 2].includes(packageLock.lockfileVersion)) {
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\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
${lib.optionalString bypassCache ''
${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} ${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} ${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"
, meta ? {}
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ];
in
stdenv.mkDerivation ({
name = "${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ lib.optional (stdenv.isDarwin) libtool
++ buildInputs;
inherit nodejs;
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
'';
meta = {
# default to Node.js' platforms
platforms = nodejs.meta.platforms;
} // meta;
} // extraArgs);
# Builds a node environment (a node_modules folder and a set of binaries)
buildNodeDependencies =
{ 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" ];
in
stdenv.mkDerivation ({
name = "node-dependencies-${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ 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
${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 ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
# Expose the executables that were installed
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
mv ${packageName} lib
ln -s $out/lib/node_modules/.bin $out/bin
'';
} // 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
nodeDependencies = buildNodeDependencies args;
in
stdenv.mkDerivation {
name = "node-shell-${name}-${version}";
buildInputs = [ python nodejs ] ++ 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 = lib.optionalString (dependencies != []) ''
export NODE_PATH=${nodeDependencies}/lib/node_modules
export PATH="${nodeDependencies}/bin:$PATH"
'';
};
in
{
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
buildNodePackage = lib.makeOverridable buildNodePackage;
buildNodeDependencies = lib.makeOverridable buildNodeDependencies;
buildNodeShell = lib.makeOverridable buildNodeShell;
}

View File

@ -1,562 +0,0 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}:
let
sources = {
"@babel/runtime-7.15.3" = {
name = "_at_babel_slash_runtime";
packageName = "@babel/runtime";
version = "7.15.3";
src = fetchurl {
url = "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz";
sha512 = "OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==";
};
};
"@bokeh/bokehjs-2.3.3" = {
name = "_at_bokeh_slash_bokehjs";
packageName = "@bokeh/bokehjs";
version = "2.3.3";
src = fetchurl {
url = "https://registry.npmjs.org/@bokeh/bokehjs/-/bokehjs-2.3.3.tgz";
sha512 = "Zev3p5xnS47YsZo5hcGGNUdISH3mkVLKSc6LMVqEIRlnc7Ay79TD9bnApeYh90k0JU1pcMh0gEqHgwVOGPTZ/w==";
};
};
"@bokeh/numbro-1.6.2" = {
name = "_at_bokeh_slash_numbro";
packageName = "@bokeh/numbro";
version = "1.6.2";
src = fetchurl {
url = "https://registry.npmjs.org/@bokeh/numbro/-/numbro-1.6.2.tgz";
sha512 = "owIECPc3T3QXHCb2v5Ez+/uE9SIxI7N4nd9iFlWnfBrOelr0/omvFn09VisRn37AAFAY39sJiCVgECwryHWUPA==";
};
};
"@bokeh/slickgrid-2.4.2702" = {
name = "_at_bokeh_slash_slickgrid";
packageName = "@bokeh/slickgrid";
version = "2.4.2702";
src = fetchurl {
url = "https://registry.npmjs.org/@bokeh/slickgrid/-/slickgrid-2.4.2702.tgz";
sha512 = "W9tm8Qdw5BrylbZbaVWaQMgLfW/klesnj6J3FnyWpo18hCCOFApccUD8iOnRv7bF6PHlgWk84mW3JT5RSzYKjA==";
};
};
"@luma.gl/constants-8.5.5" = {
name = "_at_luma.gl_slash_constants";
packageName = "@luma.gl/constants";
version = "8.5.5";
src = fetchurl {
url = "https://registry.npmjs.org/@luma.gl/constants/-/constants-8.5.5.tgz";
sha512 = "3pDC7jFaXliDP7Gvr6pPkorLFBXDnuakNeN87aEYcIM+p3XrkF0rPnDQJEzwScWS9RIopXT858xmL3vG7IYsDw==";
};
};
"@types/debounce-1.2.0" = {
name = "_at_types_slash_debounce";
packageName = "@types/debounce";
version = "1.2.0";
src = fetchurl {
url = "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.0.tgz";
sha512 = "bWG5wapaWgbss9E238T0R6bfo5Fh3OkeoSt245CM7JJwVwpw6MEBCbIxLq5z8KzsE3uJhzcIuQkyiZmzV3M/Dw==";
};
};
"@types/gl-matrix-2.4.5" = {
name = "_at_types_slash_gl-matrix";
packageName = "@types/gl-matrix";
version = "2.4.5";
src = fetchurl {
url = "https://registry.npmjs.org/@types/gl-matrix/-/gl-matrix-2.4.5.tgz";
sha512 = "0L8Mq1+oaIW0oVzGUDbSW+HnTjCNb4CmoIQE5BkoHt/A7x20z0MJ1PnwfH3atty/vbWLGgvJwVu2Mz3SKFiEFw==";
};
};
"@types/jquery-3.5.6" = {
name = "_at_types_slash_jquery";
packageName = "@types/jquery";
version = "3.5.6";
src = fetchurl {
url = "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.6.tgz";
sha512 = "SmgCQRzGPId4MZQKDj9Hqc6kSXFNWZFHpELkyK8AQhf8Zr6HKfCzFv9ZC1Fv3FyQttJZOlap3qYb12h61iZAIg==";
};
};
"@types/sizzle-2.3.3" = {
name = "_at_types_slash_sizzle";
packageName = "@types/sizzle";
version = "2.3.3";
src = fetchurl {
url = "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz";
sha512 = "JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==";
};
};
"@types/slickgrid-2.1.31" = {
name = "_at_types_slash_slickgrid";
packageName = "@types/slickgrid";
version = "2.1.31";
src = fetchurl {
url = "https://registry.npmjs.org/@types/slickgrid/-/slickgrid-2.1.31.tgz";
sha512 = "t/LodOkh8yP+o2jKcHsC0hAjDh1kl4RSFXKWmR9+U5FwXE7VpipqiAkE1W3NnGNA3ni5xnKQJt/CNXurJWTQ6w==";
};
};
"choices.js-9.0.1" = {
name = "choices.js";
packageName = "choices.js";
version = "9.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/choices.js/-/choices.js-9.0.1.tgz";
sha512 = "JgpeDY0Tmg7tqY6jaW/druSklJSt7W68tXFJIw0GSGWmO37SDAL8o60eICNGbzIODjj02VNNtf5h6TgoHDtCsA==";
};
};
"d-1.0.1" = {
name = "d";
packageName = "d";
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/d/-/d-1.0.1.tgz";
sha512 = "m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==";
};
};
"debounce-1.2.1" = {
name = "debounce";
packageName = "debounce";
version = "1.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz";
sha512 = "XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==";
};
};
"deepmerge-4.2.2" = {
name = "deepmerge";
packageName = "deepmerge";
version = "4.2.2";
src = fetchurl {
url = "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz";
sha512 = "FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==";
};
};
"es5-ext-0.10.53" = {
name = "es5-ext";
packageName = "es5-ext";
version = "0.10.53";
src = fetchurl {
url = "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz";
sha512 = "Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==";
};
};
"es6-iterator-2.0.3" = {
name = "es6-iterator";
packageName = "es6-iterator";
version = "2.0.3";
src = fetchurl {
url = "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz";
sha1 = "a7de889141a05a94b0854403b2d0a0fbfa98f3b7";
};
};
"es6-map-0.1.5" = {
name = "es6-map";
packageName = "es6-map";
version = "0.1.5";
src = fetchurl {
url = "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz";
sha1 = "9136e0503dcc06a301690f0bb14ff4e364e949f0";
};
};
"es6-promise-4.2.8" = {
name = "es6-promise";
packageName = "es6-promise";
version = "4.2.8";
src = fetchurl {
url = "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz";
sha512 = "HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==";
};
};
"es6-set-0.1.5" = {
name = "es6-set";
packageName = "es6-set";
version = "0.1.5";
src = fetchurl {
url = "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz";
sha1 = "d2b3ec5d4d800ced818db538d28974db0a73ccb1";
};
};
"es6-symbol-3.1.1" = {
name = "es6-symbol";
packageName = "es6-symbol";
version = "3.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz";
sha1 = "bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77";
};
};
"es6-symbol-3.1.3" = {
name = "es6-symbol";
packageName = "es6-symbol";
version = "3.1.3";
src = fetchurl {
url = "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz";
sha512 = "NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==";
};
};
"es6-weak-map-2.0.3" = {
name = "es6-weak-map";
packageName = "es6-weak-map";
version = "2.0.3";
src = fetchurl {
url = "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz";
sha512 = "p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==";
};
};
"event-emitter-0.3.5" = {
name = "event-emitter";
packageName = "event-emitter";
version = "0.3.5";
src = fetchurl {
url = "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz";
sha1 = "df8c69eef1647923c7157b9ce83840610b02cc39";
};
};
"ext-1.5.0" = {
name = "ext";
packageName = "ext";
version = "1.5.0";
src = fetchurl {
url = "https://registry.npmjs.org/ext/-/ext-1.5.0.tgz";
sha512 = "+ONcYoWj/SoQwUofMr94aGu05Ou4FepKi7N7b+O8T4jVfyIsZQV1/xeS8jpaBzF0csAk0KLXoHCxU7cKYZjo1Q==";
};
};
"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==";
};
};
"flatbush-3.3.0" = {
name = "flatbush";
packageName = "flatbush";
version = "3.3.0";
src = fetchurl {
url = "https://registry.npmjs.org/flatbush/-/flatbush-3.3.0.tgz";
sha512 = "F3EzQvKpdmXUbFwWxLKBpytOFEGYQMCTBLuqZ4GEajFOEAvnOIBiyxW3OFSZXIOtpCS8teN6bFEpNZtnVXuDQA==";
};
};
"flatpickr-4.6.9" = {
name = "flatpickr";
packageName = "flatpickr";
version = "4.6.9";
src = fetchurl {
url = "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.9.tgz";
sha512 = "F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw==";
};
};
"flatqueue-1.2.1" = {
name = "flatqueue";
packageName = "flatqueue";
version = "1.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/flatqueue/-/flatqueue-1.2.1.tgz";
sha512 = "X86TpWS1rGuY7m382HuA9vngLeDuWA9lJvhEG+GfgKMV5onSvx5a71cl7GMbXzhWtlN9dGfqOBrpfqeOtUfGYQ==";
};
};
"fuse.js-3.6.1" = {
name = "fuse.js";
packageName = "fuse.js";
version = "3.6.1";
src = fetchurl {
url = "https://registry.npmjs.org/fuse.js/-/fuse.js-3.6.1.tgz";
sha512 = "hT9yh/tiinkmirKrlv4KWOjztdoZo1mx9Qh4KvWqC7isoXwdUY3PNWUxceF4/qO9R6riA2C29jdTOeQOIROjgw==";
};
};
"gl-matrix-3.3.0" = {
name = "gl-matrix";
packageName = "gl-matrix";
version = "3.3.0";
src = fetchurl {
url = "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.3.0.tgz";
sha512 = "COb7LDz+SXaHtl/h4LeaFcNdJdAQSDeVqjiIihSXNrkWObZLhDI4hIkZC11Aeqp7bcE72clzB0BnDXr2SmslRA==";
};
};
"hammerjs-2.0.8" = {
name = "hammerjs";
packageName = "hammerjs";
version = "2.0.8";
src = fetchurl {
url = "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz";
sha1 = "04ef77862cff2bb79d30f7692095930222bf60f1";
};
};
"htm-3.1.0" = {
name = "htm";
packageName = "htm";
version = "3.1.0";
src = fetchurl {
url = "https://registry.npmjs.org/htm/-/htm-3.1.0.tgz";
sha512 = "L0s3Sid5r6YwrEvkig14SK3Emmc+kIjlfLhEGn2Vy3bk21JyDEes4MoDsbJk6luaPp8bugErnxPz86ZuAw6e5Q==";
};
};
"jquery-3.6.0" = {
name = "jquery";
packageName = "jquery";
version = "3.6.0";
src = fetchurl {
url = "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz";
sha512 = "JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==";
};
};
"jquery-ui-1.12.1" = {
name = "jquery-ui";
packageName = "jquery-ui";
version = "1.12.1";
src = fetchurl {
url = "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.12.1.tgz";
sha1 = "bcb4045c8dd0539c134bc1488cdd3e768a7a9e51";
};
};
"json-formatter-js-2.3.4" = {
name = "json-formatter-js";
packageName = "json-formatter-js";
version = "2.3.4";
src = fetchurl {
url = "https://registry.npmjs.org/json-formatter-js/-/json-formatter-js-2.3.4.tgz";
sha512 = "gmAzYRtPRmYzeAT4T7+t3NhTF89JOAIioCVDddl9YDb3ls3kWcskirafw/MZGJaRhEU6fRimGJHl7CC7gaAI2Q==";
};
};
"mgrs-1.0.0" = {
name = "mgrs";
packageName = "mgrs";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/mgrs/-/mgrs-1.0.0.tgz";
sha1 = "fb91588e78c90025672395cb40b25f7cd6ad1829";
};
};
"next-tick-1.0.0" = {
name = "next-tick";
packageName = "next-tick";
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz";
sha1 = "ca86d1fe8828169b0120208e3dc8424b9db8342c";
};
};
"nouislider-14.7.0" = {
name = "nouislider";
packageName = "nouislider";
version = "14.7.0";
src = fetchurl {
url = "https://registry.npmjs.org/nouislider/-/nouislider-14.7.0.tgz";
sha512 = "4RtQ1+LHJKesDCNJrXkQcwXAWCrC2aggdLYMstS/G5fEWL+fXZbUA9pwVNHFghMGuFGRATlDLNInRaPeRKzpFQ==";
};
};
"preact-10.5.14" = {
name = "preact";
packageName = "preact";
version = "10.5.14";
src = fetchurl {
url = "https://registry.npmjs.org/preact/-/preact-10.5.14.tgz";
sha512 = "KojoltCrshZ099ksUZ2OQKfbH66uquFoxHSbnwKbTJHeQNvx42EmC7wQVWNuDt6vC5s3nudRHFtKbpY4ijKlaQ==";
};
};
"proj4-2.7.5" = {
name = "proj4";
packageName = "proj4";
version = "2.7.5";
src = fetchurl {
url = "https://registry.npmjs.org/proj4/-/proj4-2.7.5.tgz";
sha512 = "5ecXUXbHAfvdhfBQpU7EhUfPCQGUCPmVup/4gnZA3bJY3JcK/xxzm4QQDz1xiXokN6ux65VDczlCtBtKrTSpAQ==";
};
};
"redux-4.1.1" = {
name = "redux";
packageName = "redux";
version = "4.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/redux/-/redux-4.1.1.tgz";
sha512 = "hZQZdDEM25UY2P493kPYuKqviVwZ58lEmGQNeQ+gXa+U0gYPUBf7NKYazbe3m+bs/DzM/ahN12DbF+NG8i0CWw==";
};
};
"regenerator-runtime-0.13.9" = {
name = "regenerator-runtime";
packageName = "regenerator-runtime";
version = "0.13.9";
src = fetchurl {
url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz";
sha512 = "p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==";
};
};
"sprintf-js-1.1.2" = {
name = "sprintf-js";
packageName = "sprintf-js";
version = "1.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz";
sha512 = "VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==";
};
};
"timezone-1.0.23" = {
name = "timezone";
packageName = "timezone";
version = "1.0.23";
src = fetchurl {
url = "https://registry.npmjs.org/timezone/-/timezone-1.0.23.tgz";
sha512 = "yhQgk6qmSLB+TF8HGmApZAVI5bfzR1CoKUGr+WMZWmx75ED1uDewAZA8QMGCQ70TEv4GmM8pDB9jrHuxdaQ1PA==";
};
};
"tslib-1.14.1" = {
name = "tslib";
packageName = "tslib";
version = "1.14.1";
src = fetchurl {
url = "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz";
sha512 = "Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==";
};
};
"tslib-2.3.1" = {
name = "tslib";
packageName = "tslib";
version = "2.3.1";
src = fetchurl {
url = "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz";
sha512 = "77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==";
};
};
"type-1.2.0" = {
name = "type";
packageName = "type";
version = "1.2.0";
src = fetchurl {
url = "https://registry.npmjs.org/type/-/type-1.2.0.tgz";
sha512 = "+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==";
};
};
"type-2.5.0" = {
name = "type";
packageName = "type";
version = "2.5.0";
src = fetchurl {
url = "https://registry.npmjs.org/type/-/type-2.5.0.tgz";
sha512 = "180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==";
};
};
"underscore.template-0.1.7" = {
name = "underscore.template";
packageName = "underscore.template";
version = "0.1.7";
src = fetchurl {
url = "https://registry.npmjs.org/underscore.template/-/underscore.template-0.1.7.tgz";
sha1 = "3013e0ea181756306f1609e959cafbc722adb3e9";
};
};
"wkt-parser-1.3.1" = {
name = "wkt-parser";
packageName = "wkt-parser";
version = "1.3.1";
src = fetchurl {
url = "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.3.1.tgz";
sha512 = "XK5qV+Y5gsygQfHx2/cS5a7Zxsgleaw8iX5UPC5eOXPc0TgJAu1JB9lr0iYYX3zAnN3p0aNiaN5c+1Bdblxwrg==";
};
};
};
args = {
name = "_at_holoviz_slash_panel";
packageName = "@holoviz/panel";
version = "0.12.1";
src = ./.;
dependencies = [
sources."@babel/runtime-7.15.3"
sources."@bokeh/bokehjs-2.3.3"
sources."@bokeh/numbro-1.6.2"
(sources."@bokeh/slickgrid-2.4.2702" // {
dependencies = [
sources."tslib-1.14.1"
];
})
sources."@luma.gl/constants-8.5.5"
sources."@types/debounce-1.2.0"
sources."@types/gl-matrix-2.4.5"
sources."@types/jquery-3.5.6"
sources."@types/sizzle-2.3.3"
sources."@types/slickgrid-2.1.31"
sources."choices.js-9.0.1"
sources."d-1.0.1"
sources."debounce-1.2.1"
sources."deepmerge-4.2.2"
sources."es5-ext-0.10.53"
sources."es6-iterator-2.0.3"
sources."es6-map-0.1.5"
sources."es6-promise-4.2.8"
(sources."es6-set-0.1.5" // {
dependencies = [
sources."es6-symbol-3.1.1"
];
})
sources."es6-symbol-3.1.3"
sources."es6-weak-map-2.0.3"
sources."event-emitter-0.3.5"
(sources."ext-1.5.0" // {
dependencies = [
sources."type-2.5.0"
];
})
sources."fast-deep-equal-2.0.1"
sources."fast-json-patch-2.2.1"
sources."flatbush-3.3.0"
sources."flatpickr-4.6.9"
sources."flatqueue-1.2.1"
sources."fuse.js-3.6.1"
sources."gl-matrix-3.3.0"
sources."hammerjs-2.0.8"
sources."htm-3.1.0"
sources."jquery-3.6.0"
sources."jquery-ui-1.12.1"
sources."json-formatter-js-2.3.4"
sources."mgrs-1.0.0"
sources."next-tick-1.0.0"
sources."nouislider-14.7.0"
sources."preact-10.5.14"
sources."proj4-2.7.5"
sources."redux-4.1.1"
sources."regenerator-runtime-0.13.9"
sources."sprintf-js-1.1.2"
sources."timezone-1.0.23"
sources."tslib-2.3.1"
sources."type-1.2.0"
sources."underscore.template-0.1.7"
sources."wkt-parser-1.3.1"
];
buildInputs = globalBuildInputs;
meta = {
description = "A high level dashboarding library for python visualization libraries.";
license = "BSD-3-Clause";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
in
{
args = args;
sources = sources;
tarball = nodeEnv.buildNodeSourceDist args;
package = nodeEnv.buildNodePackage args;
shell = nodeEnv.buildNodeShell args;
nodeDependencies = nodeEnv.buildNodeDependencies (lib.overrideExisting args {
src = stdenv.mkDerivation {
name = args.name + "-package-json";
src = nix-gitignore.gitignoreSourcePure [
"*"
"!package.json"
"!package-lock.json"
] args.src;
dontBuild = true;
installPhase = "mkdir -p $out; cp -r ./* $out;";
};
});
}

View File

@ -1,27 +0,0 @@
{
"name": "@holoviz/panel",
"version": "0.12.1",
"description": "A high level dashboarding library for python visualization libraries.",
"license": "BSD-3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/holoviz/panel.git"
},
"dependencies": {
"@bokeh/bokehjs": "^2.3.3",
"@luma.gl/constants": "^8.0.3",
"@types/debounce": "^1.2.0",
"@types/gl-matrix": "^2.4.5",
"debounce": "^1.2.0",
"fast-json-patch": "^2.2.1",
"gl-matrix": "^3.1.0",
"htm": "^3.0.4",
"json-formatter-js": "^2.2.1",
"preact": "^10.5.12"
},
"devDependencies": {},
"files": [
"dist/**/*.{js,js.map,d.ts,json,css}"
],
"main": "dist/panel.min.js"
}