Merge pull request #230158 from teutat3s/triton-buildnpmpackage
nodePackages.{triton,manta}: repackage using buildNpmPackage
This commit is contained in:
commit
2b8f1156a8
@ -34,7 +34,9 @@ let
|
||||
in
|
||||
|
||||
mapAliases {
|
||||
"@antora/cli" = pkgs.antora;
|
||||
"@antora/cli" = pkgs.antora; # Added 2023-05-06
|
||||
"@githubnext/github-copilot-cli" = pkgs.github-copilot-cli; # Added 2023-05-02
|
||||
"@nestjs/cli" = pkgs.nest-cli;
|
||||
"@nestjs/cli" = pkgs.nest-cli; # Added 2023-05-06
|
||||
manta = pkgs.node-manta; # Added 2023-05-06
|
||||
trito = pkgs.triton; # Added 2023-05-06
|
||||
}
|
||||
|
@ -214,7 +214,6 @@
|
||||
, "lua-fmt"
|
||||
, "lv_font_conv"
|
||||
, "madoko"
|
||||
, "manta"
|
||||
, "markdownlint-cli"
|
||||
, "markdownlint-cli2"
|
||||
, "markdown-link-check"
|
||||
@ -365,7 +364,6 @@
|
||||
, "three"
|
||||
, "tiddlywiki"
|
||||
, "titanium"
|
||||
, "triton"
|
||||
, "tsun"
|
||||
, "ts-node"
|
||||
, "ttf2eot"
|
||||
|
394
pkgs/development/node-packages/node-packages.nix
generated
394
pkgs/development/node-packages/node-packages.nix
generated
@ -126368,198 +126368,6 @@ in
|
||||
bypassCache = 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 {
|
||||
name = "markdownlint-cli";
|
||||
packageName = "markdownlint-cli";
|
||||
@ -149660,208 +149468,6 @@ in
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
triton = nodeEnv.buildNodePackage {
|
||||
name = "triton";
|
||||
packageName = "triton";
|
||||
version = "7.15.4";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/triton/-/triton-7.15.4.tgz";
|
||||
sha512 = "xGR0oMmwiP4eiCGn4kLN5TWi8Dh+hMrLQ30KJQy7gRf9uhcBX3bQXTeuWVC9Yh8WUuHKJ2Wdgii88JZ4hIIUHw==";
|
||||
};
|
||||
dependencies = [
|
||||
sources."asn1-0.2.6"
|
||||
sources."assert-plus-0.2.0"
|
||||
sources."backoff-2.4.1"
|
||||
sources."balanced-match-1.0.2"
|
||||
sources."bcrypt-pbkdf-1.0.2"
|
||||
sources."bigspinner-3.1.0"
|
||||
sources."brace-expansion-1.1.11"
|
||||
sources."bunyan-1.8.12"
|
||||
sources."clone-0.1.5"
|
||||
(sources."cmdln-4.1.2" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
sources."extsprintf-1.4.1"
|
||||
];
|
||||
})
|
||||
sources."concat-map-0.0.1"
|
||||
sources."core-util-is-1.0.3"
|
||||
(sources."dashdash-1.14.1" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
];
|
||||
})
|
||||
sources."dtrace-provider-0.8.8"
|
||||
sources."ecc-jsbn-0.1.2"
|
||||
sources."extsprintf-1.0.2"
|
||||
sources."fast-safe-stringify-1.2.3"
|
||||
sources."fuzzyset.js-0.0.1"
|
||||
(sources."getpass-0.1.6" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
];
|
||||
})
|
||||
sources."glob-5.0.15"
|
||||
(sources."http-signature-1.3.6" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
sources."extsprintf-1.3.0"
|
||||
sources."json-schema-0.4.0"
|
||||
sources."jsprim-2.0.2"
|
||||
];
|
||||
})
|
||||
sources."inflight-1.0.6"
|
||||
sources."inherits-2.0.4"
|
||||
sources."is-absolute-0.1.7"
|
||||
sources."is-relative-0.1.3"
|
||||
sources."isarray-1.0.0"
|
||||
sources."isexe-1.1.2"
|
||||
sources."jsbn-0.1.1"
|
||||
sources."json-schema-0.2.3"
|
||||
(sources."jsprim-1.4.0" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
sources."verror-1.3.6"
|
||||
];
|
||||
})
|
||||
sources."keep-alive-agent-0.0.1"
|
||||
sources."lodash-4.17.21"
|
||||
(sources."lomstream-1.1.0" // {
|
||||
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-1.6.0"
|
||||
sources."minimatch-3.1.2"
|
||||
sources."minimist-0.0.8"
|
||||
sources."mkdirp-0.5.1"
|
||||
sources."moment-2.29.4"
|
||||
sources."mooremachine-2.3.0"
|
||||
sources."mute-stream-0.0.8"
|
||||
sources."mv-2.1.1"
|
||||
sources."nan-2.17.0"
|
||||
sources."ncp-2.0.0"
|
||||
sources."once-1.3.2"
|
||||
sources."path-is-absolute-1.0.1"
|
||||
sources."precond-0.2.3"
|
||||
sources."process-nextick-args-2.0.1"
|
||||
sources."pseudomap-1.0.2"
|
||||
sources."read-1.0.7"
|
||||
(sources."readable-stream-2.3.8" // {
|
||||
dependencies = [
|
||||
sources."safe-buffer-5.1.2"
|
||||
];
|
||||
})
|
||||
(sources."restify-clients-1.5.2" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
(sources."restify-errors-3.1.0" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-0.2.0"
|
||||
sources."lodash-3.10.1"
|
||||
];
|
||||
})
|
||||
];
|
||||
})
|
||||
(sources."restify-errors-3.0.0" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-0.1.5"
|
||||
sources."lodash-3.10.1"
|
||||
];
|
||||
})
|
||||
sources."rimraf-2.4.4"
|
||||
sources."safe-buffer-5.2.1"
|
||||
sources."safe-json-stringify-1.2.0"
|
||||
sources."safer-buffer-2.1.2"
|
||||
sources."semver-5.1.0"
|
||||
(sources."smartdc-auth-2.5.7" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
(sources."dashdash-1.10.1" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-0.1.5"
|
||||
];
|
||||
})
|
||||
sources."extsprintf-1.0.0"
|
||||
sources."json-schema-0.2.2"
|
||||
(sources."jsprim-0.3.0" // {
|
||||
dependencies = [
|
||||
sources."verror-1.3.3"
|
||||
];
|
||||
})
|
||||
sources."once-1.3.0"
|
||||
sources."vasync-1.4.3"
|
||||
sources."verror-1.1.0"
|
||||
];
|
||||
})
|
||||
(sources."sshpk-1.17.0" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
];
|
||||
})
|
||||
(sources."sshpk-agent-1.7.0" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
sources."sshpk-1.14.2"
|
||||
];
|
||||
})
|
||||
(sources."string_decoder-1.1.1" // {
|
||||
dependencies = [
|
||||
sources."safe-buffer-5.1.2"
|
||||
];
|
||||
})
|
||||
sources."strsplit-1.0.0"
|
||||
(sources."tabula-1.10.0" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
];
|
||||
})
|
||||
sources."tunnel-agent-0.6.0"
|
||||
sources."tweetnacl-0.14.5"
|
||||
sources."util-deprecate-1.0.2"
|
||||
sources."uuid-3.4.0"
|
||||
(sources."vasync-1.6.3" // {
|
||||
dependencies = [
|
||||
sources."extsprintf-1.2.0"
|
||||
sources."verror-1.6.0"
|
||||
];
|
||||
})
|
||||
(sources."verror-1.10.0" // {
|
||||
dependencies = [
|
||||
sources."assert-plus-1.0.0"
|
||||
sources."core-util-is-1.0.2"
|
||||
sources."extsprintf-1.4.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-1.2.4"
|
||||
sources."wordwrap-1.0.0"
|
||||
sources."wrappy-1.0.2"
|
||||
sources."yallist-2.1.2"
|
||||
];
|
||||
buildInputs = globalBuildInputs;
|
||||
meta = {
|
||||
description = "Triton CLI and client (https://www.tritondatacenter.com/)";
|
||||
homepage = "https://github.com/TritonDataCenter/node-triton";
|
||||
license = "MPL-2.0";
|
||||
};
|
||||
production = true;
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
tsun = nodeEnv.buildNodePackage {
|
||||
name = "tsun";
|
||||
packageName = "tsun";
|
||||
|
@ -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 (
|
||||
if stdenv.isDarwin
|
||||
then {}
|
||||
@ -560,14 +546,6 @@ final: prev: {
|
||||
'';
|
||||
};
|
||||
|
||||
triton = prev.triton.override (oldAttrs: {
|
||||
nativeBuildInputs = [ pkgs.installShellFiles ];
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd triton --bash <($out/bin/triton completion)
|
||||
'';
|
||||
meta = oldAttrs.meta // { maintainers = with lib.maintainers; [ teutat3s ]; };
|
||||
});
|
||||
|
||||
ts-node = prev.ts-node.override {
|
||||
nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
|
||||
postInstall = ''
|
||||
|
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"
|
44
pkgs/tools/admin/triton/default.nix
Normal file
44
pkgs/tools/admin/triton/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ lib
|
||||
, buildNpmPackage
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, testers
|
||||
, triton
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "triton";
|
||||
version = "7.15.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TritonDataCenter";
|
||||
repo = "node-triton";
|
||||
rev = version;
|
||||
hash = "sha256-RjYJT8Iw9JZzvd2d9zh2CS27qUx12nDi12k+YuTh7tk=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-2ZTTgJ4LzmlfFoNNNPrrmna5pbREshdw5x9w5N7nasc=";
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd triton --bash <($out/bin/triton completion)
|
||||
# Strip timestamp from generated bash completion
|
||||
sed -i '/Bash completion generated.*/d' $out/share/bash-completion/completions/triton.bash
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.version = testers.testVersion {
|
||||
package = triton;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "TritonDataCenter Client CLI and Node.js SDK";
|
||||
homepage = "https://github.com/TritonDataCenter/node-triton";
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ teutat3s ];
|
||||
};
|
||||
}
|
@ -13082,7 +13082,9 @@ with pkgs;
|
||||
|
||||
trickle = callPackage ../tools/networking/trickle { };
|
||||
|
||||
inherit (nodePackages) triton;
|
||||
node-manta = callPackage ../tools/admin/manta { };
|
||||
|
||||
triton = callPackage ../tools/admin/triton { };
|
||||
|
||||
triggerhappy = callPackage ../tools/inputmethods/triggerhappy { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user