Unverified Commit 4c0227b0 authored by 夜坂雅's avatar 夜坂雅
Browse files

netlify-cli: 12.2.4 -> 17.37.1, migrate to buildNpmPackage

parent 467c797b
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
# This file has been generated by node2nix 1.11.1. Do not edit!

{pkgs ? import <nixpkgs> {
    inherit system;
  }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_18"}:

let
  nodeEnv = import ./node-env.nix {
    inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
    inherit pkgs nodejs;
    libtool = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null;
  };
in
import ./node-packages.nix {
  inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
  inherit nodeEnv;
}
+40 −18
Original line number Diff line number Diff line
{ callPackage, fetchFromGitHub, lib, pkgs }:
let
  nodePackages = import ./composition.nix { inherit pkgs; };
  sourceInfo = (lib.importJSON ./netlify-cli.json);
in
  nodePackages.package.override {
    preRebuild = ''
      export ESBUILD_BINARY_PATH="${pkgs.esbuild_netlify}/bin/esbuild"
    '';
{
  callPackage,
  vips,
  pkg-config,
  lib,
  buildNpmPackage,
  fetchFromGitHub,
  nix-update-script,
}:

buildNpmPackage rec {
  pname = "netlify-cli";
  version = "17.37.1";

  src = fetchFromGitHub {
      inherit (sourceInfo) owner repo rev hash;
    owner = "netlify";
    repo = "cli";
    rev = "refs/tags/v${version}";
    hash = "sha256-34WvnbvLv2bB8CTlFKf351eQ5enYRhDqHoHRvJTBq4M=";
  };

  npmDepsHash = "sha256-zbr8TVCIKa/x5vzc3bR++qDcu0AuAgq1rfE69rytCWw=";

  buildInputs = [ vips ];
  nativeBuildInputs = [ pkg-config ];

  passthru = {
    tests.test = callPackage ./test.nix { };
    updateScript = nix-update-script { };
  };

  meta = {
    description = "Netlify command line tool";
    homepage = "https://github.com/netlify/cli";
    changelog = "https://github.com/netlify/cli/blob/v${version}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ roberth ];
    mainProgram = "netlify";
  };
    bypassCache = true;
    reconstructLock = true;
    passthru.tests.test = callPackage ./test.nix { };
    meta.maintainers = with lib.maintainers; [ roberth ];
    meta.mainProgram = "netlify";
}
+0 −14
Original line number Diff line number Diff line
#!/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 hash; }')"
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-18 \
  ;
+0 −6
Original line number Diff line number Diff line
{
    "owner": "netlify",
    "repo": "cli",
    "rev": "6c7e8c9a4db4e2e408f65e6098a194497944e306",
    "hash": "sha256-YMnQrurZDJtfeHBCIzy6vToGHnqtdRGvWFPX5RcWyPg="
}
+0 −689

File deleted.

Preview size limit exceeded, changes collapsed.

Loading