From 16b9a5590ee5b6a0677b5b233d65ced3b2329ed3 Mon Sep 17 00:00:00 2001 From: DavHau Date: Mon, 15 Apr 2024 16:03:16 +0700 Subject: [PATCH] docs: bundle devShell as static executable --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 6f82815..b77e735 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,28 @@ $ ./python3 -c 'import numpy, scipy, pandas; print("Success !")' Success ! ``` +#### Bundle whole dev environment + +Bundle a complex development environment including tools like compilers, linters, interpreters, etc. into a static executable. + +Prerequisites: +- use [numtide/devshell](https://github.com/numtide/devshell) to define your devShell (`mkShell` from nixpkgs won't work because it is not executable) +- expose the devShell via a flake.nix based repo on github + +```shellSession +$ nix bundle --bundler github:DavHau/nix-portable -o devshell github:/#devShells..default +$ cp ./devshell/bin/devshell ./devshell && chmod +w ./devshell +$ ./devshell +🔨 Welcome to devshell + +[[general commands]] +[...] +``` + +#### Bundle compression + +To create smaller bundles specify `--bundler github:DavHau/nix-portable#zstd-max`. + ### Supported platforms Potentially any linux system with an **x86_64** or **aarch64** CPU is supported.