nodePackages.manta: convert to buildNpmPackage
Renamed package to node-manta, because manta is already taken
This commit is contained in:
parent
7048a87e3c
commit
60737bc2d1
|
@ -37,5 +37,6 @@ mapAliases {
|
||||||
"@antora/cli" = pkgs.antora;
|
"@antora/cli" = pkgs.antora;
|
||||||
"@githubnext/github-copilot-cli" = pkgs.github-copilot-cli; # Added 2023-05-02
|
"@githubnext/github-copilot-cli" = pkgs.github-copilot-cli; # Added 2023-05-02
|
||||||
"@nestjs/cli" = pkgs.nest-cli;
|
"@nestjs/cli" = pkgs.nest-cli;
|
||||||
|
manta = pkgs.node-manta; # Added 2023-05-06
|
||||||
trito = pkgs.triton; # Added 2023-05-06
|
trito = pkgs.triton; # Added 2023-05-06
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,7 +214,6 @@
|
||||||
, "lua-fmt"
|
, "lua-fmt"
|
||||||
, "lv_font_conv"
|
, "lv_font_conv"
|
||||||
, "madoko"
|
, "madoko"
|
||||||
, "manta"
|
|
||||||
, "markdownlint-cli"
|
, "markdownlint-cli"
|
||||||
, "markdownlint-cli2"
|
, "markdownlint-cli2"
|
||||||
, "markdown-link-check"
|
, "markdown-link-check"
|
||||||
|
|
192
pkgs/development/node-packages/node-packages.nix
generated
192
pkgs/development/node-packages/node-packages.nix
generated
|
@ -126368,198 +126368,6 @@ in
|
||||||
bypassCache = true;
|
bypassCache = true;
|
||||||
reconstructLock = true;
|
reconstructLock = true;
|
||||||
};
|
};
|
||||||
manta = nodeEnv.buildNodePackage {
|
|
||||||
name = "manta";
|
|
||||||
packageName = "manta";
|
|
||||||
version = "5.3.2";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://registry.npmjs.org/manta/-/manta-5.3.2.tgz";
|
|
||||||
sha512 = "Vsgmc7hZbra1oicuHH9e5UNkcVyRJiH+Y4uvpTW3OQ60NhUAbv3V+re3ZtyN51MH3QJ9WNgkMAfR8dZ3Sv5gCw==";
|
|
||||||
};
|
|
||||||
dependencies = [
|
|
||||||
sources."ansi-regex-4.1.1"
|
|
||||||
sources."ansi-styles-3.2.1"
|
|
||||||
sources."asn1-0.2.6"
|
|
||||||
sources."assert-plus-1.0.0"
|
|
||||||
sources."backoff-2.3.0"
|
|
||||||
sources."balanced-match-1.0.2"
|
|
||||||
sources."bcrypt-pbkdf-1.0.2"
|
|
||||||
sources."block-stream-0.0.9"
|
|
||||||
sources."brace-expansion-1.1.11"
|
|
||||||
sources."bunyan-1.8.15"
|
|
||||||
sources."camelcase-5.3.1"
|
|
||||||
sources."cliui-5.0.0"
|
|
||||||
sources."clone-0.1.19"
|
|
||||||
sources."cmdln-4.1.2"
|
|
||||||
sources."color-convert-1.9.3"
|
|
||||||
sources."color-name-1.1.3"
|
|
||||||
sources."concat-map-0.0.1"
|
|
||||||
sources."core-util-is-1.0.2"
|
|
||||||
sources."dashdash-1.14.1"
|
|
||||||
sources."decamelize-1.2.0"
|
|
||||||
sources."dtrace-provider-0.8.8"
|
|
||||||
sources."ecc-jsbn-0.1.2"
|
|
||||||
sources."emoji-regex-7.0.3"
|
|
||||||
sources."extsprintf-1.4.1"
|
|
||||||
sources."fast-safe-stringify-1.2.3"
|
|
||||||
sources."find-up-3.0.0"
|
|
||||||
sources."fstream-1.0.12"
|
|
||||||
sources."fuzzyset.js-0.0.1"
|
|
||||||
sources."get-caller-file-2.0.5"
|
|
||||||
sources."getpass-0.1.7"
|
|
||||||
sources."glob-6.0.4"
|
|
||||||
sources."graceful-fs-4.2.11"
|
|
||||||
sources."hogan.js-2.0.0"
|
|
||||||
(sources."http-signature-1.3.6" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."extsprintf-1.3.0"
|
|
||||||
sources."jsprim-2.0.2"
|
|
||||||
sources."verror-1.10.0"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."inflight-1.0.6"
|
|
||||||
sources."inherits-2.0.4"
|
|
||||||
sources."is-fullwidth-code-point-2.0.0"
|
|
||||||
sources."isarray-0.0.1"
|
|
||||||
sources."jsbn-0.1.1"
|
|
||||||
sources."json-schema-0.4.0"
|
|
||||||
(sources."jsprim-1.4.2" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."extsprintf-1.3.0"
|
|
||||||
sources."verror-1.10.0"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."keep-alive-agent-0.0.1"
|
|
||||||
sources."locate-path-3.0.0"
|
|
||||||
sources."lodash-4.17.21"
|
|
||||||
(sources."lomstream-1.1.1" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."assert-plus-0.1.5"
|
|
||||||
sources."extsprintf-1.3.0"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."lru-cache-4.1.5"
|
|
||||||
sources."lstream-0.0.4"
|
|
||||||
sources."mime-2.4.7"
|
|
||||||
sources."minimatch-3.1.2"
|
|
||||||
sources."minimist-1.2.8"
|
|
||||||
sources."mkdirp-0.5.6"
|
|
||||||
sources."moment-2.29.4"
|
|
||||||
(sources."mooremachine-2.3.0" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."assert-plus-0.2.0"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."mv-2.1.1"
|
|
||||||
sources."nan-2.17.0"
|
|
||||||
sources."ncp-2.0.0"
|
|
||||||
sources."once-1.4.0"
|
|
||||||
sources."p-limit-2.3.0"
|
|
||||||
sources."p-locate-3.0.0"
|
|
||||||
sources."p-try-2.2.0"
|
|
||||||
sources."path-exists-3.0.0"
|
|
||||||
sources."path-is-absolute-1.0.1"
|
|
||||||
sources."path-platform-0.0.1"
|
|
||||||
sources."precond-0.2.3"
|
|
||||||
sources."process-nextick-args-2.0.1"
|
|
||||||
(sources."progbar-1.2.1" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."readable-stream-1.0.34"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."pseudomap-1.0.2"
|
|
||||||
sources."readable-stream-1.1.14"
|
|
||||||
sources."require-directory-2.1.1"
|
|
||||||
sources."require-main-filename-2.0.0"
|
|
||||||
(sources."restify-clients-1.6.0" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."backoff-2.5.0"
|
|
||||||
sources."mime-1.6.0"
|
|
||||||
sources."uuid-3.4.0"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
(sources."restify-errors-3.1.0" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."assert-plus-0.2.0"
|
|
||||||
sources."lodash-3.10.1"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."rimraf-2.4.5"
|
|
||||||
sources."safe-buffer-5.2.1"
|
|
||||||
sources."safe-json-stringify-1.2.0"
|
|
||||||
sources."safer-buffer-2.1.2"
|
|
||||||
sources."semver-5.7.1"
|
|
||||||
sources."set-blocking-2.0.0"
|
|
||||||
sources."showdown-1.9.1"
|
|
||||||
(sources."smartdc-auth-2.5.9" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."bunyan-1.8.12"
|
|
||||||
sources."clone-0.1.5"
|
|
||||||
(sources."dashdash-1.10.1" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."assert-plus-0.1.5"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."once-1.3.0"
|
|
||||||
sources."vasync-2.2.1"
|
|
||||||
sources."verror-1.10.0"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."sshpk-1.17.0"
|
|
||||||
(sources."sshpk-agent-1.8.1" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."isarray-1.0.0"
|
|
||||||
sources."readable-stream-2.3.8"
|
|
||||||
sources."safe-buffer-5.1.2"
|
|
||||||
sources."sshpk-1.16.1"
|
|
||||||
sources."string_decoder-1.1.1"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."string-width-3.1.0"
|
|
||||||
sources."string_decoder-0.10.31"
|
|
||||||
sources."strip-ansi-5.2.0"
|
|
||||||
sources."strsplit-1.0.0"
|
|
||||||
sources."tar-2.2.2"
|
|
||||||
sources."tunnel-agent-0.6.0"
|
|
||||||
sources."tweetnacl-0.14.5"
|
|
||||||
sources."util-deprecate-1.0.2"
|
|
||||||
sources."uuid-2.0.3"
|
|
||||||
(sources."vasync-1.6.4" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."extsprintf-1.2.0"
|
|
||||||
sources."verror-1.6.0"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."verror-1.10.1"
|
|
||||||
(sources."vstream-0.1.0" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."assert-plus-0.1.5"
|
|
||||||
sources."extsprintf-1.2.0"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
(sources."watershed-0.3.4" // {
|
|
||||||
dependencies = [
|
|
||||||
sources."readable-stream-1.0.2"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
sources."which-module-2.0.1"
|
|
||||||
sources."wrap-ansi-5.1.0"
|
|
||||||
sources."wrappy-1.0.2"
|
|
||||||
sources."y18n-4.0.3"
|
|
||||||
sources."yallist-2.1.2"
|
|
||||||
sources."yargs-14.2.3"
|
|
||||||
sources."yargs-parser-15.0.3"
|
|
||||||
];
|
|
||||||
buildInputs = globalBuildInputs;
|
|
||||||
meta = {
|
|
||||||
description = "Manta Client API";
|
|
||||||
homepage = "http://apidocs.tritondatacenter.com/manta";
|
|
||||||
license = "MIT";
|
|
||||||
};
|
|
||||||
production = true;
|
|
||||||
bypassCache = true;
|
|
||||||
reconstructLock = true;
|
|
||||||
};
|
|
||||||
markdownlint-cli = nodeEnv.buildNodePackage {
|
markdownlint-cli = nodeEnv.buildNodePackage {
|
||||||
name = "markdownlint-cli";
|
name = "markdownlint-cli";
|
||||||
packageName = "markdownlint-cli";
|
packageName = "markdownlint-cli";
|
||||||
|
|
|
@ -280,20 +280,6 @@ final: prev: {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
manta = prev.manta.override ( oldAttrs: {
|
|
||||||
nativeBuildInputs = with pkgs; [ nodejs_14 installShellFiles ];
|
|
||||||
postInstall = ''
|
|
||||||
# create completions, following upstream procedure https://github.com/joyent/node-manta/blob/v5.2.3/Makefile#L85-L91
|
|
||||||
completion_cmds=$(find ./bin -type f -printf "%f\n")
|
|
||||||
|
|
||||||
node ./lib/create_client.js
|
|
||||||
for cmd in $completion_cmds; do
|
|
||||||
installShellCompletion --cmd $cmd --bash <(./bin/$cmd --completion)
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
meta = oldAttrs.meta // { maintainers = with lib.maintainers; [ teutat3s ]; };
|
|
||||||
});
|
|
||||||
|
|
||||||
mermaid-cli = prev."@mermaid-js/mermaid-cli".override (
|
mermaid-cli = prev."@mermaid-js/mermaid-cli".override (
|
||||||
if stdenv.isDarwin
|
if stdenv.isDarwin
|
||||||
then {}
|
then {}
|
||||||
|
|
65
pkgs/tools/admin/manta/default.nix
Normal file
65
pkgs/tools/admin/manta/default.nix
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
{ lib
|
||||||
|
, buildNpmPackage
|
||||||
|
, fetchurl
|
||||||
|
, nodejs
|
||||||
|
, installShellFiles
|
||||||
|
, testers
|
||||||
|
, node-manta
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
source = lib.importJSON ./source.json;
|
||||||
|
in
|
||||||
|
buildNpmPackage rec {
|
||||||
|
pname = "manta";
|
||||||
|
inherit (source) version;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://registry.npmjs.org/${pname}/-/${source.filename}";
|
||||||
|
hash = source.integrity;
|
||||||
|
};
|
||||||
|
|
||||||
|
npmDepsHash = source.deps;
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ nodejs installShellFiles ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# Use generated package-lock.json as upstream does not provide one
|
||||||
|
ln -s ${./package-lock.json} package-lock.json
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
ln -s ./lib/node_modules/manta/bin $out/bin
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
# create completions, following upstream procedure https://github.com/joyent/node-manta/blob/v5.3.2/Makefile#L85-L91
|
||||||
|
cmds=$(find ./bin/ -type f -printf "%f\n")
|
||||||
|
|
||||||
|
node $out/lib/node_modules/manta/lib/create_client.js
|
||||||
|
|
||||||
|
for cmd in $cmds; do
|
||||||
|
installShellCompletion --cmd $cmd --bash <($out/bin/$cmd --completion)
|
||||||
|
|
||||||
|
# Strip timestamp from generated bash completion
|
||||||
|
sed -i '/Bash completion generated.*/d' $out/share/bash-completion/completions/$cmd.bash
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests.version = testers.testVersion {
|
||||||
|
package = node-manta;
|
||||||
|
};
|
||||||
|
updateScript = ./update.sh;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Manta Object-Storage Client CLIs and Node.js SDK";
|
||||||
|
homepage = "https://github.com/TritonDataCenter/node-manta";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ teutat3s ];
|
||||||
|
mainProgram = "mls";
|
||||||
|
};
|
||||||
|
}
|
3477
pkgs/tools/admin/manta/package-lock.json
generated
Normal file
3477
pkgs/tools/admin/manta/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
6
pkgs/tools/admin/manta/source.json
Normal file
6
pkgs/tools/admin/manta/source.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"version": "5.3.2",
|
||||||
|
"integrity": "sha512-Vsgmc7hZbra1oicuHH9e5UNkcVyRJiH+Y4uvpTW3OQ60NhUAbv3V+re3ZtyN51MH3QJ9WNgkMAfR8dZ3Sv5gCw==",
|
||||||
|
"filename": "manta-5.3.2.tgz",
|
||||||
|
"deps": "sha256-npoCp4PSgv1gK6PziQZINkHUfqxTu8sBbYR/HRu98KA="
|
||||||
|
}
|
25
pkgs/tools/admin/manta/update.sh
Executable file
25
pkgs/tools/admin/manta/update.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#! nix-shell -i bash -p nodejs libarchive prefetch-npm-deps moreutils
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
set -exuo pipefail
|
||||||
|
|
||||||
|
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
|
||||||
|
|
||||||
|
TMPDIR="$(mktemp -d)"
|
||||||
|
trap 'rm -r -- "$TMPDIR"' EXIT
|
||||||
|
|
||||||
|
pushd -- "$TMPDIR"
|
||||||
|
npm pack manta --json | jq '.[0] | { version, integrity, filename }' > source.json
|
||||||
|
bsdtar -x -f "$(jq -r .filename source.json)"
|
||||||
|
|
||||||
|
pushd package
|
||||||
|
npm install --package-lock-only
|
||||||
|
popd
|
||||||
|
|
||||||
|
DEPS="$(prefetch-npm-deps package/package-lock.json)"
|
||||||
|
jq ".deps = \"$DEPS\"" source.json | sponge source.json
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
cp -t . -- "$TMPDIR/source.json" "$TMPDIR/package/package-lock.json"
|
|
@ -13080,6 +13080,8 @@ with pkgs;
|
||||||
|
|
||||||
trickle = callPackage ../tools/networking/trickle { };
|
trickle = callPackage ../tools/networking/trickle { };
|
||||||
|
|
||||||
|
node-manta = callPackage ../tools/admin/manta { };
|
||||||
|
|
||||||
triton = callPackage ../tools/admin/triton { };
|
triton = callPackage ../tools/admin/triton { };
|
||||||
|
|
||||||
triggerhappy = callPackage ../tools/inputmethods/triggerhappy { };
|
triggerhappy = callPackage ../tools/inputmethods/triggerhappy { };
|
||||||
|
|
Loading…
Reference in a new issue