commit b45b1959e4df9d746b782e86affe64063e3345be
parent 0bd25bcb280479cb3fe28d1ff56eb7cb383b9afc
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Thu, 6 Jun 2024 14:54:56 +0200
feat: add nix-shell dev env
Diffstat:
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/docs/NIX.md b/docs/NIX.md
@@ -1,4 +1,5 @@
-# Nix build documentation
+# Nix documentation
+Follow the instructions here when developing or building on/for Nix.
## Notes for nightly builds
Before building or installing the unstable release, replace the hash of the
@@ -29,3 +30,12 @@ nix-env -i -f nix/diary.nix
# Install latest nightly version
nix-env -i -f nix/diary-unstable.nix
```
+
+## Development environment
+To prepare a nix shell as a dev environment, use the `shell.nix`:
+* https://nixos.wiki/wiki/Development_environment_with_nix-shell
+
+```bash
+cd nix
+nix-shell
+```
diff --git a/nix/shell.nix b/nix/shell.nix
@@ -0,0 +1,11 @@
+{ pkgs ? import <nixpkgs> {} }:
+ pkgs.mkShell {
+ nativeBuildInputs = with pkgs.buildPackages; [
+ ncurses
+ curlFull
+ babeltrace
+ lttng-ust
+ lttng-tools
+ valgrind
+ ];
+}