forked from orhun/git-cliff
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add basic Nix environment (orhun#743)
- Loading branch information
1 parent
da1cb61
commit de433c5
Showing
4 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
use flake | ||
dotenv_if_exists .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,10 @@ | |
**/*.rs.bk | ||
|
||
*.flamegraph.svg | ||
|
||
# direnv | ||
/.direnv/ | ||
|
||
# Potential Nix stuff | ||
/result | ||
/result-* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
description = "git-cliff"; | ||
|
||
inputs = { | ||
nixpkgs.url = | ||
"github:nixos/nixpkgs/nixos-unstable"; # We want to use packages from the binary cache | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
rust-overlay.url = "github:oxalica/rust-overlay"; | ||
}; | ||
|
||
outputs = inputs@{ self, nixpkgs, flake-utils, ... }: | ||
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
overlays = [ inputs.rust-overlay.overlays.rust-overlay ]; | ||
}; | ||
in { | ||
devShell = pkgs.mkShell { | ||
CARGO_INSTALL_ROOT = "${toString ./.}/.cargo"; | ||
|
||
buildInputs = with pkgs; [ | ||
pkg-config | ||
openssl | ||
cargo-binutils | ||
cargo-watch | ||
lld | ||
(rust-bin.fromRustupToolchain { | ||
channel = "stable"; | ||
components = | ||
[ "rust-analyzer" "rust-src" "rustfmt" "rustc" "cargo" ]; | ||
}) | ||
]; | ||
}; | ||
}); | ||
} |