-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
49 lines (47 loc) · 1.27 KB
/
flake.nix
File metadata and controls
49 lines (47 loc) · 1.27 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
{
description = "Elevating the tactile dialogue. A high-fidelity visual and auditory companion that gives your keystrokes a modern resonance.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
systems,
rust-overlay,
...
}: let
withOverlay = pkgs: pkgs.extend (import rust-overlay);
eachSystem = fn:
nixpkgs.lib.genAttrs
(import systems)
(system: fn (withOverlay nixpkgs.legacyPackages.${system}));
in {
packages = eachSystem (pkgs: let
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = [
"rust-src"
"rust-analyzer"
"clippy"
"rustfmt"
];
};
in {
default = pkgs.callPackage ./nix/package.nix {
rustPlatform = pkgs.makeRustPlatform {
cargo = rustToolchain;
rustc = rustToolchain;
};
};
});
devShells = eachSystem (pkgs: {
default = pkgs.callPackage ./nix/shell.nix {
hibiki = self.packages.${pkgs.stdenv.hostPlatform.system}.default;
};
});
};
}