-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
38 lines (37 loc) · 1.06 KB
/
Copy pathflake.nix
File metadata and controls
38 lines (37 loc) · 1.06 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
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs;
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-compat, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
aoclib-rs = pkgs.rustPlatform.buildRustPackage {
pname = manifest.name;
version = manifest.version;
src = builtins.path { path = ./.; name = "aoclib-rs"; };
cargoLock = { lockFile = ./Cargo.lock; };
};
aoclib-rs-shell = pkgs.mkShell {
inputsFrom = [ aoclib-rs ];
packages = with pkgs; [
clippy
rustfmt
];
};
in
{
packages = {
inherit aoclib-rs;
default = aoclib-rs;
};
devShells = {
inherit aoclib-rs-shell;
default = aoclib-rs-shell;
};
}
);
}