nixpkgs/pkgs/development/web/netlify-cli/generate.sh
panda2134 2ff4e9ea84 netlify-cli: refactor
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-11-24 12:28:03 +00:00

15 lines
476 B
Bash
Executable File

#!/usr/bin/env bash
set -eu -o pipefail
cd "$( dirname "${BASH_SOURCE[0]}" )"
rm -f ./node-env.nix
src="$(nix-build --expr 'let pkgs = import ../../../.. {}; meta = (pkgs.lib.importJSON ./netlify-cli.json); in pkgs.fetchFromGitHub { inherit (meta) owner repo rev sha256; }')"
echo $src
node2nix \
--input $src/package.json \
--lock $src/npm-shrinkwrap.json \
--output node-packages.nix \
--composition composition.nix \
--node-env node-env.nix \
--nodejs-16 \
;