Create a temporary shell environment containing specified applications.
- Install Nix (learn more about this installer)
curl --proto '=https' --tlsv1.2 -sSf \
-L https://install.determinate.systems/nix \
| sh -s -- install
- Install app-shell
nix profile install github:imincik/app-shell#app-shell
- Create shell containing QGIS and GDAL apps
app-shell --apps qgis,gdal
- Add Python with some modules as well
app-shell --apps qgis,gdal,python3 --python-packages python3Packages.numpy,python3Packages.pyproj
- Finally, launch QGIS on start
app-shell --apps qgis,gdal,python3 --python-packages python3Packages.numpy,python3Packages.pyproj -- qgis
- Or maybe, compile some software
// test.c
#include <stdio.h>
#include <curl/curl.h>
int main() {
CURL *curl;
curl = curl_easy_init();
if (curl) {
printf("It works !\n");
} else {
printf("libcurl failed to initialize.\n");
}
return 0;
}
app-shell --apps gcc --libs curl --include-libs curl -- gcc test.c -lcurl -o test && ./test
It works !
- Run
app-shell --help
to learn more.
nix-shell was originally designed to provide a debugging environment for Nix derivations. It does a lot of magic and populates the environment with a lot of unnecessary content (packages, shell environment variables and functions).
app-shell
is much more simple, cleaner and lighter. It only fetches required
packages to the /nix/store
and propagates them via relevant
environment variables.