-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Your examples assume that the user wants to build everything with flakes etc, but the user might also just want to reuse upstream as environment and use relative paths.
Reasoning:
-
- found no simple way to reference via relative path other flakes etc on system.
-
- shell.nix + direnv is the most simple way to get a reproducible dev setup
-
- flakes and other methods copy things to global nix store and user might not want copies of files lying around
Paths:
~/dev/zdev/zig/
~/dev/zdev/zig-bootstrap/
~/dev/zdev/shell.nix
~/dev/zdev/.envrc
~/dev/zi/shell.nix
~/dev/zi/.envrc
~/dev/zdev/shell.nix
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/01441e14af5e29c9d27ace398e6dd0b293e25a54.tar.gz") {} }:
pkgs.stdenvNoCC.mkDerivation {
name = "shell";
nativeBuildInputs = with pkgs; [
cmake
gdb
libxml2
ninja
python3
qemu
valgrind
wasmtime
] ++ (with llvmPackages_16; [
clang
clang-unwrapped
lld
llvm
]);
}~/dev/zi/shell.nix with shellHook example:
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/01441e14af5e29c9d27ace398e6dd0b293e25a54.tar.gz") {} }:
pkgs.stdenvNoCC.mkDerivation {
name = "shell";
nativeBuildInputs = with pkgs; [
gdb
qemu
valgrind
wasmtime
];
PROJECT_ROOT = builtins.toString ./.;
shellHook = ''
PATH=$PATH:$PROJECT_ROOT/../zdev/zig/master/rel/bin/
'';
}Metadata
Metadata
Assignees
Labels
No labels