diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d6cf6f5 --- /dev/null +++ b/flake.nix | |||
@@ -0,0 +1,45 @@ | |||
1 | { | ||
2 | description = "An implementation of the Language Protocol Server for Pug.js"; | ||
3 | |||
4 | inputs = { | ||
5 | lsp-src = { | ||
6 | #)url = github:opa-oz/pug-lsp; | ||
7 | url = path:/home/op/leet/pug-lsp/; | ||
8 | flake = false; | ||
9 | }; | ||
10 | }; | ||
11 | |||
12 | outputs = | ||
13 | { self | ||
14 | , lsp-src | ||
15 | , nixpkgs | ||
16 | }: | ||
17 | let | ||
18 | supportedSystems = [ "x86_64-linux" ]; | ||
19 | forAllSystems = nixpkgs.lib.genAttrs supportedSystems; | ||
20 | nixpkgsFor = forAllSystems (system: import nixpkgs { | ||
21 | inherit system; | ||
22 | overlays = [ self.overlays.default ]; | ||
23 | }); | ||
24 | in | ||
25 | { | ||
26 | overlays.default = final: prev: { | ||
27 | pug-lsp = | ||
28 | final.buildGoModule { | ||
29 | vendorHash = "sha256-WQS8yx2g1j30SpBTCIIpbpHiPW4n2XqT4tnJtY9FQxA="; | ||
30 | pname = "pug-lsp"; | ||
31 | version = "master"; | ||
32 | # doCheck = false; # update source | ||
33 | src = lsp-src; | ||
34 | buildInputs = []; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | packages = forAllSystems (system: { | ||
39 | inherit (nixpkgsFor."${system}") pug-lsp; | ||
40 | }); | ||
41 | |||
42 | defaultPackage = forAllSystems (system: self.packages."${system}".pug-lsp); | ||
43 | }; | ||
44 | } | ||
45 | |||