README.md
1 # Concepts 2 3 Core ideas behind aleph. 4 5 ## [Prelude](prelude.md) 6 7 A functional library for Nix. 100+ functions with Haskell-style naming and semantics. 8 9 - **Fundamentals**: `id`, `const`, `flip`, `compose`, `pipe`, `fix` 10 - **Lists**: `map`, `filter`, `fold`, `head`, `tail`, `take`, `drop`, `zip`, `sort`, `unique` 11 - **Attrs**: `map-attrs`, `filter-attrs`, `keys`, `values`, `get`, `set`, `merge`, `to-list` 12 - **Strings**: `split`, `join`, `trim`, `replace`, `starts-with`, `ends-with`, `to-lower` 13 - **Maybe**: `maybe`, `from-maybe`, `is-null`, `cat-maybes`, `map-maybe` 14 - **Either**: `left`, `right`, `is-left`, `is-right`, `either`, `from-right` 15 - **Types**: `is-list`, `is-attrs`, `is-string`, `is-int`, `is-function`, `typeof` 16 17 ## [Overlays](overlays.md) 18 19 Composable nixpkgs transformations. Eight overlays that can be used individually or together. 20 21 - **prelude**: `pkgs.aleph.prelude`, `pkgs.aleph.stdenv`, `pkgs.aleph.cross` 22 - **container**: `pkgs.aleph.container.mk-namespace-env`, `unshare-run`, `fhs-run`, `gpu-run` 23 - **script**: `pkgs.aleph.script.ghc`, `gen-wrapper`, `check`, compiled scripts 24 - **libmodern**: `pkgs.libmodern.fmt`, `pkgs.libmodern.abseil-cpp`, `pkgs.libmodern.libsodium` 25 - **ghc-wasm**: GHC WASM backend for `builtins.wasm` integration 26 - **llvm-git**: LLVM from git with SM120 Blackwell support 27 - **nvidia-sdk**: CUDA 13.x packages 28 - **packages**: `pkgs.mdspan` 29 30 ## [Stdenvs](stdenvs.md) 31 32 Build environments with real debug info. The "Turing Registry" - flags that make code debuggable. 33 34 | Name | Compiler | Libc | Linking | 35 |------|----------|------|---------| 36 | `clang-glibc-dynamic` | Clang | glibc | Dynamic | 37 | `clang-glibc-static` | Clang | glibc | Static | 38 | `clang-musl-dynamic` | Clang | musl | Dynamic | 39 | `clang-musl-static` | Clang | musl | Static | 40 | `gcc-glibc-dynamic` | GCC | glibc | Dynamic | 41 | `gcc-musl-static` | GCC | musl | Static | 42 | `nvidia` | Clang+CUDA | glibc | Dynamic | 43 44 All stdenvs include: `-O2 -g3 -gdwarf-5 -fno-omit-frame-pointer` 45 46 ## [Aleph.Script](typed-unix.md) 47 48 Haskell scripts instead of bash. `Aleph.Script` combines Shelly's foundation with Turtle's ergonomics. 49 50 ```haskell 51 import Aleph.Script 52 53 main :: IO () 54 main = script $ do 55 files <- ls "." 56 for_ files $ \f -> 57 when (hasExtension "nix" f) $ 58 echo $ format ("Found: "%fp) f 59 ``` 60 61 32 compiled scripts for containers, VMs, GPU passthrough, linting.