Migrate to wedges

This commit is contained in:
Nettika 2026-02-16 12:28:25 -08:00
parent cf19b5725f
commit cda034b29e
No known key found for this signature in database
GPG key ID: C357EE70D5027BCC
8 changed files with 242 additions and 151 deletions

View file

@ -1,14 +1,19 @@
# oils-for-unix from source
```bash
NIXPKGS_ALLOW_INSECURE=1 nix-build .
nix-build .
```
The build uses Python 2 for legacy build scripts. Python 2, marked insecure in nixpkgs, is not present in the final binaries.
Builds OSH and YSH shell interpreters from git source using upstream-style wedges.
## Files
- `oils-for-unix-0.37.0.nix` - from-source Oils
- `mypy-0.780.nix` - mypy 0.780 (last version to support --py2) built without mypyc
- `mypy-extensions-0.4.4.nix` - mypy-extensions pinned to <0.5.0 for mypy 0.780 compatibility
- `typed-ast-1.5.5.nix` - typed-ast for Python 2 AST parsing (removed from nixpkgs)
- `package.nix` - Main oils-for-unix derivation
- `wedges.nix` - Python 2.7.18, Python 3.10.4, and mypy 0.780 built from source
- `requirements.txt` - Pinned pip dependencies for mypy
## Why wedges?
The build uses Python 2 for legacy build scripts and mypy 0.780 (last version with `--py2` support). Rather than depending on nixpkgs Python packages (which have compatibility issues), we build Python from official tarballs - mirroring oils' own `build/deps.sh` wedge system.
Python is only used at build time; final binaries are native C++.