Commit 9731d545 authored by dish's avatar dish
Browse files

ckd8s-cli: migrate from nodePackages

parent eaa6f93b
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  fetchYarnDeps,
  yarnConfigHook,
  yarnBuildHook,
  yarnInstallHook,
  nodejs,
  nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "cdk8s-cli";
  version = "2.203.1";

  src = fetchFromGitHub {
    owner = "cdk8s-team";
    repo = "cdk8s-cli";
    rev = "v${finalAttrs.version}";
    hash = "sha256-vp4AdAreL7qFp91l0OTwHJuqatCrBRRlXZ4cydQy2H0=";
  };

  yarnOfflineCache = fetchYarnDeps {
    inherit (finalAttrs) src;
    hash = "sha256-0lsA4FabwKF5JoCU2JlcEcgldGeICUZtl1kAcI7sqSQ=";
  };

  nativeBuildInputs = [
    yarnConfigHook
    yarnBuildHook
    yarnInstallHook
    nodejs
  ];

  # Skip tests, they need network access
  env.SKIP_TESTS = 1;

  # Set the version properly, setting it earlier makes the build fail
  # because `projen` requires a version of 0.0.0 in the package.json
  postInstall = ''
    substituteInPlace $out/lib/node_modules/cdk8s-cli/package.json \
      --replace-fail '0.0.0' '${finalAttrs.version}'
  '';

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Command-line-interface for CDK for Kubernetes";
    homepage = "https://github.com/cdk8s-team/cdk8s-cli";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ pyrox0 ];
    mainProgram = "cdk8s";
  };
})
+1 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ mapAliases {
  inherit (pkgs) carbon-now-cli; # added 2023-08-17
  inherit (pkgs) carto; # added 2023-08-17
  castnow = pkgs.castnow; # added 2023-07-30
  inherit (pkgs) cdk8s-cli; # Added 2025-11-10
  inherit (pkgs) cdktf-cli; # added 2025-10-02
  inherit (pkgs) clean-css-cli; # added 2023-08-18
  inherit (pkgs) coc-clangd; # added 2024-06-29
+0 −1
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
  # Packages that provide a single executable.
  "@angular/cli" = "ng";
  aws-cdk = "cdk";
  cdk8s-cli = "cdk8s";
  clipboard-cli = "clipboard";
  cpy-cli = "cpy";
  fast-cli = "fast";
+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@
, "awesome-lint"
, "browserify"
, "browser-sync"
, "cdk8s-cli"
, "clipboard-cli"
, "coc-go"
, "coc-ltex"
+0 −709

File changed.

Preview size limit exceeded, changes collapsed.