node-manta: 5.3.2 -> 5.4.1
https://github.com/TritonDataCenter/node-manta/blob/master/CHANGES.md#540 https://github.com/TritonDataCenter/node-manta/blob/master/CHANGES.md#541 * Removed vendored package-lock.json, upstream included it in their repo * Removed update script in favor of nix-update
This commit is contained in:
parent
5148520bfa
commit
adbb5944ad
4 changed files with 10 additions and 3526 deletions
|
@ -1,41 +1,34 @@
|
|||
{ lib
|
||||
, buildNpmPackage
|
||||
, fetchurl
|
||||
, nodejs
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, testers
|
||||
, node-manta
|
||||
}:
|
||||
|
||||
let
|
||||
source = lib.importJSON ./source.json;
|
||||
in
|
||||
buildNpmPackage rec {
|
||||
pname = "manta";
|
||||
inherit (source) version;
|
||||
version = "5.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/${pname}/-/${source.filename}";
|
||||
hash = source.integrity;
|
||||
src = fetchFromGitHub {
|
||||
owner = "TritonDataCenter";
|
||||
repo = "node-manta";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-C6O5yTCBABMsz2scot8v3IwPbdYvJyZbcPOLfeDXCoo=";
|
||||
};
|
||||
|
||||
npmDepsHash = source.deps;
|
||||
npmDepsHash = "sha256-4Zz9sSUXE2dXdkIka2z5bQ2pNmCXXCBS2Sr0JHQOBQw=";
|
||||
|
||||
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
|
||||
'';
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
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
|
||||
# create completions, following upstream procedure https://github.com/joyent/node-manta/blob/v5.4.1/Makefile#L85-L91
|
||||
cmds=$(find ./bin/ -type f -printf "%f\n")
|
||||
|
||||
node $out/lib/node_modules/manta/lib/create_client.js
|
||||
|
@ -52,7 +45,6 @@ buildNpmPackage rec {
|
|||
tests.version = testers.testVersion {
|
||||
package = node-manta;
|
||||
};
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
3477
pkgs/tools/admin/manta/package-lock.json
generated
3477
pkgs/tools/admin/manta/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"version": "5.3.2",
|
||||
"integrity": "sha512-Vsgmc7hZbra1oicuHH9e5UNkcVyRJiH+Y4uvpTW3OQ60NhUAbv3V+re3ZtyN51MH3QJ9WNgkMAfR8dZ3Sv5gCw==",
|
||||
"filename": "manta-5.3.2.tgz",
|
||||
"deps": "sha256-npoCp4PSgv1gK6PziQZINkHUfqxTu8sBbYR/HRu98KA="
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
#!/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"
|
Loading…
Reference in a new issue