Skip to content

Commit

Permalink
netlify-cli: 12.2.4 -> 17.37.1, migrate to buildNpmPackage (NixOS#350891
Browse files Browse the repository at this point in the history
)
  • Loading branch information
roberth authored Nov 14, 2024
2 parents 9121e18 + 4c0227b commit f8d0c64
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 12,693 deletions.
17 changes: 0 additions & 17 deletions pkgs/development/web/netlify-cli/composition.nix

This file was deleted.

58 changes: 40 additions & 18 deletions pkgs/development/web/netlify-cli/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,40 @@
{ 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"
'';
src = fetchFromGitHub {
inherit (sourceInfo) owner repo rev hash;
};
bypassCache = true;
reconstructLock = true;
passthru.tests.test = callPackage ./test.nix { };
meta.maintainers = with lib.maintainers; [ roberth ];
meta.mainProgram = "netlify";
}
{
callPackage,
vips,
pkg-config,
lib,
buildNpmPackage,
fetchFromGitHub,
nix-update-script,
}:

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

src = fetchFromGitHub {
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";
};
}
14 changes: 0 additions & 14 deletions pkgs/development/web/netlify-cli/generate.sh

This file was deleted.

6 changes: 0 additions & 6 deletions pkgs/development/web/netlify-cli/netlify-cli.json

This file was deleted.

Loading

0 comments on commit f8d0c64

Please sign in to comment.