Skip to content

Commit

Permalink
docs: bundle devShell as static executable
Browse files Browse the repository at this point in the history
  • Loading branch information
DavHau committed Apr 15, 2024
1 parent 7eba433 commit 16b9a55
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<user>/<repo>#devShells.<system>.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.
Expand Down

0 comments on commit 16b9a55

Please sign in to comment.