File tree 2 files changed +21
-13
lines changed
2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change
1
+ use flake
Original file line number Diff line number Diff line change 3
3
nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable" ;
4
4
} ;
5
5
6
- outputs =
7
- {
8
- nixpkgs ,
9
- flake-utils ,
10
- ...
11
- } :
6
+ outputs = {
7
+ nixpkgs ,
8
+ flake-utils ,
9
+ ...
10
+ } :
12
11
flake-utils . lib . eachDefaultSystem (
13
- system :
14
- let
12
+ system : let
15
13
pkgs = import nixpkgs {
16
14
inherit system ;
17
15
} ;
18
16
manifest = pkgs . lib . importTOML ./Cargo.toml ;
19
17
buildInputs = with pkgs ; [
20
- # required for the flake
21
- pkgs . makeWrapper
18
+ # required for the derivation
19
+ makeWrapper
22
20
23
21
# makes it more performant
24
22
libGL
30
28
xorg . libX11
31
29
libxkbcommon
32
30
] ;
33
- in
34
- {
31
+ in {
35
32
devShells . default = pkgs . mkShell {
36
- inherit buildInputs ;
33
+ buildInputs =
34
+ buildInputs
35
+ ++ ( with pkgs ; [
36
+ cargo
37
+ rustc
38
+ rustfmt
39
+ rustPackages . clippy
40
+ rust-analyzer
41
+ bacon
42
+ ] ) ;
37
43
LD_LIBRARY_PATH = pkgs . lib . makeLibraryPath buildInputs ;
38
44
} ;
39
45
packages . default = pkgs . rustPlatform . buildRustPackage {
50
56
--suffix LD_LIBRARY_PATH : ${ pkgs . lib . makeLibraryPath buildInputs }
51
57
'' ;
52
58
} ;
59
+ formatter = pkgs . alejandra ;
53
60
}
54
61
) ;
55
62
}
You can’t perform that action at this time.
0 commit comments