Skip to content

Commit

Permalink
build: add flake.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
George-Miao committed Mar 12, 2024
1 parent 7fbd340 commit 479fe82
Show file tree
Hide file tree
Showing 2 changed files with 167 additions and 0 deletions.
130 changes: 130 additions & 0 deletions flake.lock

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

37 changes: 37 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
description = "Compio dev shell";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/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;
};
in
with pkgs; {
devShells.default = mkShell {
buildInputs = [
openssl
pkg-config
(rust-bin.selectLatestNightlyWith (toolchain:
toolchain.default.override {
extensions = ["rust-src"];
}))
];
};
}
);
}

0 comments on commit 479fe82

Please sign in to comment.