nixpkgs/pkgs/by-name/em/emmet-ls/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
985 B
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
, fetchpatch
}:
buildNpmPackage rec {
pname = "emmet-ls";
version = "0.4.1";
src = fetchFromGitHub {
owner = "aca";
repo = "emmet-ls";
rev = version;
hash = "sha256-TmsJpVLF9FZf/6uOM9LZBKC6S3bMPjA3QMiRMPaY9Dg=";
};
npmDepsHash = "sha256-Boaxkad7S6H+eTW5AHwBa/zj/f1oAGGSsmW1QrzuFWc=";
patches = [
# update package-lock.json as it is outdated
(fetchpatch {
name = "fix-lock-file-to-match-package-json.patch";
url = "https://github.com/aca/emmet-ls/commit/111111a2c2113f751fa12a716ccfbeae61c32079.patch";
hash = "sha256-/3ZbOBxScnfhL1F66cnIoD2flVeYTJ2sLxNHQ9Yrgjw=";
})
];
meta = with lib; {
description = "Emmet support based on LSP";
homepage = "https://github.com/aca/emmet-ls";
changelog = "https://github.com/aca/emmet-ls/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "emmet-ls";
};
}