Unverified Commit c1e930c6 authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

nodePackages: migrate more packages from the set (#459891)

parents 0a022aba 39c4aa65
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  buildVimPlugin,
  pkgs,
  coc-nginx,
}:
final: prev:
let
@@ -60,3 +61,9 @@ lib.genAttrs cocPackages (
    src = "${cocPkg}/lib/node_modules/${cocPkg.pname}";
  }
)
// {
  coc-nginx = buildVimPlugin {
    inherit (coc-nginx) pname version meta;
    src = "${coc-nginx}/lib/node_modules/@yaegassy/coc-nginx";
  };
}
+2 −9
Original line number Diff line number Diff line
@@ -10,20 +10,13 @@ let
    "coc-ltex"
    "coc-tsserver"
    "coc-ultisnips"
    "coc-nginx"
  ];

  packageNameOverrides = {
    "coc-nginx" = "@yaegassy/coc-nginx";
  };

  getPackageName = name: packageNameOverrides.${name} or name;
in
lib.genAttrs nodePackageNames (
  name:
  buildVimPlugin {
    pname = name;
    inherit (nodePackages.${getPackageName name}) version meta;
    src = "${nodePackages.${getPackageName name}}/lib/node_modules/${getPackageName name}";
    inherit (nodePackages.${name}) version meta;
    src = "${nodePackages.${name}}/lib/node_modules/${name}";
  }
)
+71 −0
Original line number Diff line number Diff line
{
  lib,
  stdenvNoCC,
  fetchFromGitHub,
  fetchYarnDeps,
  yarnConfigHook,
  yarnBuildHook,
  yarnInstallHook,
  nodejs,
  nix-update-script,
  esbuild,
  buildGoModule,
}:
let
  esbuild' =
    let
      version = "0.16.17";
    in
    esbuild.override {
      buildGoModule =
        args:
        buildGoModule (
          args
          // {
            inherit version;
            src = fetchFromGitHub {
              owner = "evanw";
              repo = "esbuild";
              rev = "v${version}";
              hash = "sha256-8L8h0FaexNsb3Mj6/ohA37nYLFogo5wXkAhGztGUUsQ=";
            };
            vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
          }
        );
    };
in
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "coc-nginx";
  version = "0.5.0";

  src = fetchFromGitHub {
    owner = "yaegassy";
    repo = "coc-nginx";
    tag = "v${finalAttrs.version}";
    hash = "sha256-9dca1YUQZCbzmGe+9qVJABCWZCGUUZDvtznMQEP/CCQ=";
  };

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

  nativeBuildInputs = [
    yarnConfigHook
    yarnBuildHook
    yarnInstallHook
    nodejs
    esbuild'
  ];

  env.ESBUILD_BINARY_PATH = lib.getExe esbuild';

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

  meta = {
    description = "nginx-language-server extension for coc.nvim";
    homepage = "https://github.com/yaegassy/coc-nginx";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
})
+43 −0
Original line number Diff line number Diff line
{
  lib,
  stdenvNoCC,
  fetchFromGitHub,
  fetchYarnDeps,
  yarnConfigHook,
  yarnBuildHook,
  yarnInstallHook,
  nodejs,
  nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "code-theme-converter";
  version = "1.2.1";

  src = fetchFromGitHub {
    owner = "tobiastimm";
    repo = "code-theme-converter";
    tag = "v${finalAttrs.version}";
    hash = "sha256-b6b0s6FXyHwoAJnPTaLu9fMQJVpBSqfGBk/KqDbaK9U=";
  };

  yarnOfflineCache = fetchYarnDeps {
    inherit (finalAttrs) src;
    hash = "sha256-M8zLr/BPQfS50ZsTwN/YdJAlYUtS9edE/jh+l1wBqR8=";
  };

  nativeBuildInputs = [
    yarnConfigHook
    yarnBuildHook
    yarnInstallHook
    nodejs
  ];

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

  meta = {
    description = "Convert any Visual Studio Code Theme to Sublime Text 3 or IntelliJ IDEA";
    homepage = "https://github.com/tobiastimm/code-theme-converter";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
})
+68 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  fetchYarnDeps,
  yarnConfigHook,
  nodejs,
  nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "commitlint";
  version = "20.1.0";

  src = fetchFromGitHub {
    owner = "conventional-changelog";
    repo = "commitlint";
    rev = "v${finalAttrs.version}";
    hash = "sha256-o8AnIewSmg8vRjs8LU6QwRyl2hMQ2iK5W7WL137treU=";
  };

  yarnOfflineCache = fetchYarnDeps {
    inherit (finalAttrs) src;
    hash = "sha256-Kg19sEgstrWj+JLzdZFnMeb0F5lFX3Z0VPNyiYPi6nY=";
  };

  nativeBuildInputs = [
    yarnConfigHook
    nodejs
  ];

  buildPhase = ''
    runHook preBuild

    pkgs=("config-validator" "rules" "parse" "is-ignored" "lint"
          "resolve-extends" "execute-rule" "load" "read" "types" "cli")
    for p in "''${pkgs[@]}" ; do
      cd @commitlint/$p/
      yarn run tsc --build --force
      cd ../..
    done

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    yarn install --offline --production --ignore-scripts
    mkdir -p $out/bin
    mkdir -p $out/lib/node_modules/@commitlint/root
    mv * $out/lib/node_modules/@commitlint/root/
    ln -s $out/lib/node_modules/@commitlint/root/@commitlint/cli/cli.js $out/bin/commitlint

    runHook postInstall
  '';

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

  meta = {
    changelog = "https://github.com/conventional-changelog/commitlint/releases/tag/v${finalAttrs.version}";
    description = "Lint your commit messages";
    homepage = "https://commitlint.js.org/";
    license = lib.licenses.mit;
    mainProgram = "commitlint";
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
})
Loading