Use a nix flake with oxalica/rust-overlay instead of a shell.nix
This commit is contained in:
parent
c51feeac77
commit
620b84fd46
5 changed files with 107 additions and 9 deletions
37
flake.nix
Normal file
37
flake.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
description = "tlater.net web server";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-20.09";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs = {
|
||||
flake-utils.follows = "flake-utils";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, rust-overlay }@inputs:
|
||||
flake-utils.lib.simpleFlake {
|
||||
inherit self nixpkgs;
|
||||
name = "tlaternet";
|
||||
preOverlays = [ rust-overlay.overlay ];
|
||||
|
||||
shell = { pkgs }:
|
||||
let
|
||||
rust_channel =
|
||||
pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||
in pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
(rust_channel.override {
|
||||
extensions =
|
||||
[ "rust-src" "rust-analysis" "rust-analyzer-preview" ];
|
||||
})
|
||||
pkgconfig
|
||||
];
|
||||
buildInputs = with pkgs; [ openssl ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue