Skip to content

Commit

Permalink
Add nix dev files
Browse files Browse the repository at this point in the history
  • Loading branch information
giggio committed May 31, 2024
1 parent a756bb6 commit 318276a
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 0 deletions.
112 changes: 112 additions & 0 deletions flake.lock

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

21 changes: 21 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
description = "my project description";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
fenix.url = "github:nix-community/fenix";
};

outputs = { self, nixpkgs, flake-utils, fenix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ fenix.overlays.default ];
};
in
{
devShells.default = import ./shell.nix { inherit pkgs; };
}
);
}
13 changes: 13 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
# nativeBuildInputs is usually what you want -- tools you need to run
nativeBuildInputs = with pkgs.buildPackages; [
(fenix.stable.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
];
}

0 comments on commit 318276a

Please sign in to comment.