Skip to content

Commit

Permalink
update flake
Browse files Browse the repository at this point in the history
  • Loading branch information
lelongg committed Dec 19, 2023
1 parent 8aa899f commit 3d0d32c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 57 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Cargo.lock
target/
.envrc
.direnv/
.direnv/
firedbg
56 changes: 13 additions & 43 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 31 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
rustStable = pkgs.rust-bin.stable.latest.minimal.override {
extensions = [ "rust-src" "clippy" "rustfmt" ];
outputs = {
self,
nixpkgs,
flake-utils,
rust-overlay,
}:
flake-utils.lib.eachDefaultSystem
(
system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
in with pkgs; {
devShell = mkShell {
buildInputs = [ openssl pkg-config rustStable cargo-release ];
rustToolchain = pkgs.pkgsBuildHost.rust-bin.nightly.latest.default.override {
extensions = ["rust-src" "rust-analyzer" "rustc-codegen-cranelift-preview"];
};
});
in
with pkgs; {
devShells.default = mkShell {
nativeBuildInputs = with pkgs; [rustToolchain pkg-config];
buildInputs = with pkgs; [openssl clang cargo-release];
RUST_BACKTRACE = "1";
};
}
);
}

0 comments on commit 3d0d32c

Please sign in to comment.