-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
54 lines (48 loc) · 1.18 KB
/
flake.nix
File metadata and controls
54 lines (48 loc) · 1.18 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
42
43
44
45
46
47
48
49
50
51
52
53
54
{
description = "trick yourself into flakes";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
inputs:
let
forAllSystems =
fn:
inputs.nixpkgs.lib.genAttrs inputs.nixpkgs.lib.systems.flakeExposed (
system:
fn (
import inputs.nixpkgs {
inherit system;
overlays = [
inputs.self.overlays.default
];
}
)
);
in
{
packages = forAllSystems (pkgs: {
inherit (pkgs) trix;
default = pkgs.trix;
});
formatter = forAllSystems (pkgs: pkgs.nixfmt-tree);
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
cargo
clippy
rust-analyzer
rustc
rustfmt
];
shellHook = ''
export PATH=$PWD/target/debug:$PATH
export RUST_SRC_PATH="${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
'';
};
});
overlays.default = final: prev: {
trix = final.callPackage ./package.nix { };
};
};
}