-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
157 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,11 @@ | ||
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" | ||
fi | ||
|
||
nix_direnv_watch_file devenv.nix | ||
nix_direnv_watch_file devenv.lock | ||
nix_direnv_watch_file devenv.yaml | ||
if ! use flake . --impure | ||
then | ||
echo "devenv could not be build. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2 | ||
fi |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
target | ||
.devenv | ||
.direnv |
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,42 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "nixpkgs/nixos-unstable"; | ||
fenix = { | ||
url = "github:nix-community/fenix"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
naersk = { | ||
url = "github:nix-community/naersk"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
}; | ||
|
||
outputs = { self, fenix, flake-utils, naersk, nixpkgs }: | ||
flake-utils.lib.eachDefaultSystem (system: { | ||
packages.default = | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
toolchain = with fenix.packages.${system}; combine [ | ||
minimal.cargo | ||
minimal.rustc | ||
]; | ||
in | ||
(naersk.lib.${system}.override { | ||
cargo = toolchain; | ||
rustc = toolchain; | ||
}).buildPackage { | ||
hardeningDisable = [ "all" ]; | ||
buildInputs = with pkgs; [ | ||
clang | ||
zlib | ||
]; | ||
nativeBuildInputs = with pkgs; [ | ||
elfutils | ||
pkg-config | ||
]; | ||
src = ./.; | ||
}; | ||
}); | ||
} | ||
|