diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2023-02-21 18:56:06 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2023-02-24 22:19:43 -0500 |
commit | 89077febca032ff9990a163a8cdb7f3bc62c3954 (patch) | |
tree | c309f7a9d06cab67c4bedf4a39da82baabd3d730 /devenv.nix | |
parent | nix .envrc, add ./result/bin path, flake.nix minor (diff) |
nix flake & build, temp. remove gdc
Diffstat (limited to 'devenv.nix')
-rw-r--r-- | devenv.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/devenv.nix b/devenv.nix new file mode 100644 index 0000000..6984ace --- /dev/null +++ b/devenv.nix @@ -0,0 +1,42 @@ +{ pkgs ? import <nixpkgs> { }, name ? "user-env" }: +with pkgs; +buildEnv { + inherit name; + extraOutputsToInstall = [ "out" "man" "lib" ]; # to get all needed symlinks + paths = [ + # ❯❯❯ nix_related + #nix # if not on NixOS, this is needed + direnv + #cachix + nixVersions.unstable #nixFlakes + nix-prefetch-git + validatePkgConfig + nix-output-monitor + nix-tree + jq + git + gnumake + ps + # ❯❯❯ d_build_related + # ❯❯ package manager + dub + # ❯❯ compiler + dmd + ldc + # ❯❯❯ 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; + }) + ]; +} |