-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathflake.nix
More file actions
41 lines (34 loc) · 1.34 KB
/
flake.nix
File metadata and controls
41 lines (34 loc) · 1.34 KB
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
{
description =
"A flake that contains the devshell, package, and package overlay of river-bsp-layout";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ self, flake-parts, nixpkgs, rust-overlay, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
flake = {
overlays.default = final: prev: {
river-bsp-layout = final.callPackage ./default.nix {
inherit (prev) rustPlatform;
};
};
};
perSystem = { config, system, pkgs, ... }: {
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [ (import inputs.rust-overlay) self.overlays.default ];
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ rust-bin.stable.latest.default rust-analyzer ];
};
packages.river-bsp-layout = pkgs.river-bsp-layout;
packages.default = config.packages.river-bsp-layout;
apps.river-bsp-layout.program = "${config.packages.river-bsp-layout}/bin/river-bsp-layout";
apps.default.program = config.apps.river-bsp-layout.program;
formatter = pkgs.nixpkgs-fmt;
};
};
}