forked from jmacdonald/amp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
36 lines (30 loc) · 1.02 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
{
inputs.nixpkgs.url = "github:nixos/nixpkgs";
inputs.naersk.url = "github:nix-community/naersk";
inputs.fenix.url = "github:nix-community/fenix";
inputs.fenix.inputs.nixpkgs.follows = "nixpkgs";
outputs = { self, nixpkgs, fenix, naersk }:
let pkgs = import nixpkgs { system = "x86_64-linux"; };
rust_tc = fenix.packages.x86_64-linux.minimal;
rust = pkgs.makeRustPlatform {
rustc = rust_tc.rustc; cargo = rust_tc.cargo;
};
in {
defaultPackage.x86_64-linux = rust.buildRustPackage {
name = "amp";
version = "0.6.2-p";
src = ./.;
cargoSha256 = "sha256-LgmNmAg45v15JOe00LJxgCXqbtmThGVoxCqO8EfIpRg=";
nativeBuildInputs = [ pkgs.python3 ];
buildInputs = [ pkgs.xorg.libxcb ];
doCheck = false; # Nix has some ... issues ... with the tests.
};
devShell.x86_64-linux = pkgs.mkShell {
buildInputs = [
pkgs.python3
pkgs.xorg.libxcb
rust_tc.rustc rust_tc.cargo
];
};
};
}