Skip to content

Commit 69f8fcf

Browse files
committed
add flake
Because `nix run github:urbit/hoon-language-server` is kinda cool.
1 parent 43379fe commit 69f8fcf

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

flake.lock

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
description = "LSP bridge for Hoon";
3+
4+
inputs = {
5+
nixpkgs = "github:nixos/nixpkgs/nixpkgs-unstable";
6+
7+
parts = {
8+
url = "github:hercules-ci/flake-parts";
9+
inputs.nixpkgs-lib.follows = "nixpkgs";
10+
};
11+
};
12+
13+
outputs = inputs @ {
14+
self
15+
, nixpkgs
16+
, parts
17+
}: parts.lib.mkFlake { inherit inputs; } {
18+
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
19+
20+
flake = {
21+
overlays.default = nixpkgs.lib.composeManyExtensions [
22+
(final: prev: {
23+
hoon-language-server = final.callPackage ./. { };
24+
})
25+
];
26+
};
27+
28+
perSystem = { pkgs, system, ... }: {
29+
imports = [
30+
{ config._module.args.pkgs = import nixpkgs { inherit system; overlays = [self.overlays.default]; }; }
31+
];
32+
33+
packages.default = pkgs.hoon-language-server;
34+
apps.default = {
35+
type = "app";
36+
program = "${pkgs.hoon-language-server}/bin/hoon-language-server";
37+
};
38+
};
39+
};
40+
}

0 commit comments

Comments
 (0)