Skip to content

Commit

Permalink
Merge pull request #226 from George-Miao/build/nix
Browse files Browse the repository at this point in the history
  • Loading branch information
George-Miao authored Mar 12, 2024
2 parents 7fbd340 + 3fa2ea5 commit c8902b8
Show file tree
Hide file tree
Showing 2 changed files with 168 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.

38 changes: 38 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
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 = [
glib
openssl
pkg-config
(rust-bin.selectLatestNightlyWith (toolchain:
toolchain.default.override {
extensions = ["rust-src"];
}))
];
};
}
);
}

0 comments on commit c8902b8

Please sign in to comment.