-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
48 lines (43 loc) · 1.06 KB
/
flake.nix
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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
nixpkgs,
fenix,
...
}: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
lib = pkgs.lib;
fenix-lib = fenix.packages.${system};
rust-toolchain-toml = (lib.importTOML ./rust-toolchain.toml).toolchain;
rust-toolchain = fenix-lib.fromToolchainName {
name = rust-toolchain-toml.channel;
sha256 = "sha256-yMuSb5eQPO/bHv+Bcf/US8LVMbf/G/0MSfiPwBhiPpk=";
};
libraries = with pkgs; [
gtk3-x11.dev
xorg.libXcursor
xorg.libXrandr
xorg.libXi
libxkbcommon
];
in {
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs;
[
nushell
pkg-config
openssl
(rust-toolchain.withComponents (rust-toolchain-toml.components))
]
++ libraries;
LD_LIBRARY_PATH = lib.makeLibraryPath libraries;
};
};
}