summaryrefslogtreecommitdiff
path: root/flake.nix
blob: d6cf6f51f482ca88136e8ed2bd07a8c4bf322d36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  description = "An implementation of the Language Protocol Server for Pug.js";

  inputs = {
    lsp-src = {
      #)url = github:opa-oz/pug-lsp;
      url = path:/home/op/leet/pug-lsp/;
      flake = false;
    };
  };

  outputs =
    { self
    , lsp-src
    , nixpkgs
    }:
    let
      supportedSystems = [ "x86_64-linux" ];
      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
      nixpkgsFor = forAllSystems (system: import nixpkgs {
        inherit system;
        overlays = [ self.overlays.default ];
      });
    in
    {
      overlays.default = final: prev: {
        pug-lsp =
          final.buildGoModule {
            vendorHash = "sha256-WQS8yx2g1j30SpBTCIIpbpHiPW4n2XqT4tnJtY9FQxA=";
            pname = "pug-lsp";
            version = "master";
            # doCheck = false;  # update source
            src = lsp-src;
            buildInputs = [];
          };
      };

      packages = forAllSystems (system: {
        inherit (nixpkgsFor."${system}") pug-lsp;
      });

      defaultPackage = forAllSystems (system: self.packages."${system}".pug-lsp);
    };
}