Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
70 lines (70 loc) · 2.08 KB
/
Copy pathflake.nix
File metadata and controls
70 lines (70 loc) · 2.08 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
description = "Asusctl for Asus on Linux";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
fenix.url = "github:nix-community/fenix/monthly";
};
outputs =
{
self,
nixpkgs,
fenix,
}:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = fn: nixpkgs.lib.genAttrs supportedSystems (system: fn system);
pkgs = (system: nixpkgs.legacyPackages.${system});
fenixpkgs = system: fenix.packages.${system};
toolchainFor =
system:
let
tc = (fenixpkgs system).toolchainOf {
channel = "1.93.0";
sha256 = "sha256-vra6TkHITpwRyA5oBKAHSX0Mi6CBDNQD+ryPSpxFsfg=";
};
in
(fenixpkgs system).combine [
tc.cargo
tc.rustc
tc.rustfmt
tc.clippy
tc.rust-src
tc.rust-analyzer
];
in
{
devShells = forAllSystems (system: {
default = (pkgs system).mkShell {
packages = [
(toolchainFor system)
(pkgs system).gettext
(pkgs system).pkg-config
(pkgs system).udev
(pkgs system).clang
(pkgs system).SDL2
(pkgs system).cargo-cranky
(pkgs system).fontconfig
(pkgs system).freetype
];
LD_LIBRARY_PATH = (pkgs system).lib.makeLibraryPath [
(pkgs system).wayland
(pkgs system).libxkbcommon
(pkgs system).vulkan-loader
(pkgs system).libGL
(pkgs system).udev
(pkgs system).vulkan-headers
(pkgs system).libxcb
(pkgs system).egl-wayland
(pkgs system).egl-x11
(pkgs system).libglvnd
(pkgs system).llvmPackages.libclang.lib
(pkgs system).stdenv.cc.cc.lib
(pkgs system).fontconfig
(pkgs system).freetype
];
LIBCLANG_PATH = "${(pkgs system).llvmPackages.libclang.lib}/lib";
RUST_SRC_PATH = "${toolchainFor system}/lib/rustlib/src/rust/library";
};
});
};
}