fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / by-name / an / ansible-language-server / package.nix
blob246ba733302fb1debe3587bec59bdb29c5e645e2
2   lib,
3   buildNpmPackage,
4   fetchFromGitHub,
5   nix-update-script,
6 }:
8 buildNpmPackage rec {
9   pname = "ansible-language-server";
10   version = "1.2.1";
12   src = fetchFromGitHub {
13     owner = "ansible";
14     repo = pname;
15     rev = "refs/tags/v${version}";
16     hash = "sha256-e6cOWoryOxWnl8q62rlGmSgwLVnoxLMwNFoGlUZw2bQ=";
17   };
19   npmDepsHash = "sha256-Lzwj0/2fxa44DJBsgDPa43AbRxggqh881X/DFnlNLig=";
20   npmBuildScript = "compile";
22   # We remove/ignore the prepare and prepack scripts because they run the
23   # build script, and therefore are redundant.
24   #
25   # Additionally, the prepack script runs npm ci in addition to the
26   # build script. Directly before npm pack is run, we make npm unaware
27   # of the dependency cache, causing the npm ci invocation to fail,
28   # wiping out node_modules, which causes a mysterious error stating that tsc isn't installed.
29   postPatch = ''
30     sed -i '/"prepare"/d' package.json
31     sed -i '/"prepack"/d' package.json
32   '';
34   npmPackFlags = [ "--ignore-scripts" ];
35   passthru.updateScript = nix-update-script { };
37   meta = with lib; {
38     changelog = "https://github.com/ansible/ansible-language-server/releases/tag/v${version}";
39     description = "Ansible Language Server";
40     mainProgram = "ansible-language-server";
41     homepage = "https://github.com/ansible/ansible-language-server";
42     license = licenses.mit;
43     maintainers = with maintainers; [ hexa ];
44   };