Initial project
This commit is contained in:
parent
7ef88c2b82
commit
d82dbd68b7
7 changed files with 220 additions and 0 deletions
34
flake.nix
Normal file
34
flake.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
description = "A basic flake with a shell";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.naersk.url = "github:nix-community/naersk";
|
||||
inputs.rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
naersk,
|
||||
rust-overlay,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [(import rust-overlay)];
|
||||
};
|
||||
rust = pkgs.rust-bin.stable.latest.default;
|
||||
naersk' = pkgs.callPackage naersk {
|
||||
cargo = rust;
|
||||
rustc = rust;
|
||||
};
|
||||
in {
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = [rust];
|
||||
RUST_PATH = "${rust}";
|
||||
RUST_DOC_PATH = "${rust}/share/doc/rust/html/std/index.html";
|
||||
};
|
||||
|
||||
defaultPackage = naersk'.buildPackage ./.;
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue