-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from Danil-Grigorev/add-nix-env
Introduce nix to cover prerequisites
- Loading branch information
Showing
4 changed files
with
57 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 @@ | ||
# default.nix | ||
{ pkgs ? import <nixpkgs> { } }: | ||
let manifest = (pkgs.lib.importTOML ./Cargo.toml).package; | ||
in | ||
pkgs.rustPlatform.buildRustPackage rec { | ||
pname = manifest.name; | ||
version = manifest.version; | ||
doCheck = false; | ||
cargoLock.lockFile = ./Cargo.lock; | ||
src = pkgs.lib.cleanSource ./.; | ||
} |
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,9 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
pkgs.mkShell { | ||
nativeBuildInputs = with pkgs; [ rustc cargo gcc rustfmt clippy ]; | ||
|
||
# Certain Rust tools won't work without this | ||
# This can also be fixed by using oxalica/rust-overlay and specifying the rust-src extension | ||
# See https://discourse.nixos.org/t/rust-src-not-found-and-other-misadventures-of-developing-rust-on-nixos/11570/3?u=samuela. for more details. | ||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; | ||
} |
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
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,23 @@ | ||
{ pkgs ? import <nixpkgs> { } }: | ||
pkgs.mkShell { | ||
# Get dependencies from the main package | ||
inputsFrom = [ (pkgs.callPackage ./default.nix { }) ]; | ||
# Additional tooling | ||
buildInputs = with pkgs; [ | ||
rust-analyzer # LSP Server | ||
rustfmt # Formatter | ||
clippy # Linter | ||
just | ||
kind | ||
kubernetes-helm | ||
clusterctl | ||
kubectl | ||
k9s | ||
jq | ||
yq | ||
envsubst | ||
iproute2 | ||
docker-client | ||
kustomize | ||
]; | ||
} |