diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2022-12-19 21:27:17 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2022-12-31 21:55:43 -0500 |
commit | da6f5d079e01906fb5dc558390659557a869df8f (patch) | |
tree | 35b99248cf1ba78b52474bea960f92984ff721c7 /devenv.nix | |
parent | sort how you want this to be (diff) |
nix flake, things nix
Diffstat (limited to 'devenv.nix')
-rwxr-xr-x | devenv.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/devenv.nix b/devenv.nix new file mode 100755 index 0000000..8098ba7 --- /dev/null +++ b/devenv.nix @@ -0,0 +1,43 @@ +{ pkgs ? import <nixpkgs> { }, name ? "user-env" }: with pkgs; +buildEnv { + inherit name; + extraOutputsToInstall = [ "out" "man" "lib" ]; # to get all needed symlinks + paths = [ + #nix # if not on NixOS, this is needed + direnv + nixVersions.unstable #nixFlakes + nix-prefetch-git + validatePkgConfig + nix-tree jq nix-output-monitor + git + ps + ### d_build_related + dub + ## compiler + dmd + ldc + #gdc + #rund + ## linker + #lld + #mold + ## builder + #ninja + #meson + ### sqlite search related + sqlite + # this will create a script that will rebuild and upgrade your setup; using shell script syntax + (writeScriptBin "nix-rebuild" '' + #!${stdenv.shell} + cd <path-to-flake> || exit 1 + nix flake update + nix profile upgrade '.*' + '') + # puts in your root the nixpkgs version + (writeTextFile { + name = "nixpkgs-version"; + destination = "/nixpkgs-version"; + text = lib.version; + }) + ]; +} |