- Proper support for opam repo management.
- Implement depexts.
- Warn on md5 hashes.
- Refactor builder.nix.
- Refactor overrides.
- Better depexts mapping:
- Filter invalid depexts names.
- Run opam actions natively with Bos.
- Apply "with-test" var when extracting install.
- Use native nixpkgs to build onix itself.
- Use the same compiler for onix and project build.
- Drop fpath, use OpamFilename.´
- Improve logging.
- Properly fix ocaml env var export for deps.
- Using hooks seems is problematic due to multi-export (fails with "Argument list too long").
- Computing the dep closure is more deterministic albeit potentially costly.
- Replace build ctx json with OCAMLPATH lookup.
- Consider installing the opam file as $libdir/$pkg/onix-opam or even overwritting ./opam.
-
Do we need to includeopam
in build ctx json or can we pass repo-url?Do we really want opam files for all deps (for opam'sdepends
var)?
-
Use builtins.filterSource for ./. src to exclude unwanted dirs (gitignore, _build). - Define build/test/dev dependencies separately in lock file?
- Handle strange version names in nix paths (like dream-pure-1.0.0-alpha2).
- So we can correctly set up buildInputs/nativeBuildInputs, etc.
- Changing project's opam file currently triggers full scope rebuild?
- Support gitignore.
- api.lock could be a derivation.
- Support dependency flags: with-build with-test with-doc with-dev/with-tools?
- Expose flags in the api module.
- Pass ignore file as a parameter: --ignore-file=(default=.gitignore).
- Read ONIX_REPO_URL.
- Allow setting dep flags for both the project and the deps.
- Nix store path parsing does not work for
nix develop
: pass nv to actions. - Ensure valid pkg names (exclude ~).
- Use two sets for depexts: nix * other instead of nix | other.
- Support zip unpacking (tezos?).
- Use builtins.foldl’.
- Handle .config files (like conf-binutils.config). Is this related to opam's
flag: conf
.- https://github.com/tweag/opam-nix/blob/8062dfe742f6636191017232ff504f6765a7f2d1/src/builder.nix#L358
- Generated on build: https://github.com/ocaml/opam-repository/blob/00777c1a37b2eac5e802e10570a76c89bc5d221e/packages/conf-binutils/conf-binutils.0.3/opam#L9
- The vars from config files should be loaded into env/vars for a package that depends on the package providing the config file.
- The
flags: conf
is probably to indicate to opam to load the .config files after build, if any. - Could be loaded via OPAM_VAR_xxx with a hook?
- The .config files also contain additional files, do we really want to copy them?
- This is because in some cases they will actually resolve to nix paths.
- An approach alternative to setting OPAM_VAR_xxx is to explicitly lookup vars in Pkg_ctx from the saved
onix-propagated-opam-vars
file. - Cache the
Dot_config
file as it's likely to be accessed multiple times.
- Use nix-prefetch-url.
- Use nix-prefetch-git for repo fetching.
- Force symlink resolution of locally vendored deps. Otherwise we get "chmod: changing permissions of 'melange': Operation not permitted"
- Make sure that incremental/partial changes to the lock file (and opam file) are possible withou full rebuild.
- Make dev tools work: vscode/vim plugins.
- Fix ocaml env vars propagation for shell.
-
Use nix-prefetch-git for pins. - Remove empty libdir after install (should at least have opam!!)?
- Install repo's opam, the monads pkg does not install opam for example.
- Document that opam vars can be set by defining OPAM_VAR_pkg_name.
- Consider using opaline.
- Or we could even intall ourselves with OpamFile.Dot_install.
- https://docs.ocaml.pro/docs/[email protected]/OpamFile/Dot_install/index.html
- Implement onix shell.
- Implement onix build.
- Add --lock-file argument to actions.
- Add a command similar to
opam var
to lookup package variables? - Improve error-handling.
- Build any package without a project
onix build utop
or similar. -
Make depends/depexts optional fields.No longer needed for new build context. - Handle empty lock file.
- Fetch opam extra-source files.
- Always patch shebangs?
-
Do we need to pass --ocaml-version? Can we expect OCaml to be always in the path?- Pass package nv to opam actions. This will fix the develop $out issue.
- Add an example with overrides.
- Support static compilation.
- Handle setenv and build-env.
- Support cross-compilation.
- Add flakes support.
-
Use strictDeps. This will require handling conf- packages in the lock file.- Added a build option.
- Handle lock file without ocaml.
- Version the lock file.
- Add version, packages and repo fields.
- Consider using joinSymlinks/linkFarm(!) to create a build scope.
- Use this for the
onix build
command, i.e., result will contain the root outputs.
- Use this for the
- Consider using makeScope for the scope.
- Handle pkg:installed?enable:disable.
- Stop using emptyPkg. Override the base compiler only?
- Would depending on the content of the opam files (as opposed to the opam file in the repo) improve cache reusability?
- Handle enable-ocaml-beta-repository.
- In theory this is now working with multirepos.
- Should we include the opam field in the lock pkg? The opam file path can be reconstructed from the repo path and pkg nv.
- Hanlde "sys-ocaml-version" var.
- Group dep flags.
- Setup the opamverse test.
- notty: seems to have a missing propagated build dep.
- When adding nativeBuildInouts we need to include all transitive deps.
- Run commands with shell?
- Filter out invalid nixpkgs names: "pkgs.devel/librdkafka"
- Slacko base-no-ppx for lwt?
- Support a vendoring/forking workflow (override src?).
- Opam-installer requires ocaml 4.13 by default. Use the same version as the rest of the build.
- Consider adding opam-installer to lock file to avoid pulling pkgs.opam-installer.
- Document diffs:
- Support compiler option packages.
- Support dev tools, test, doc.
- Support pins.
- Support cross.
- Support lock-file.
- Support easy building of any package without nix lock.
- Support offline mode.
- Prefetch packages to compute sha256 when md5 is used.
- Support multiple opam repositories.
- Help debug nix paths (eg show opam repo path)
- When the scope is built but there was a pkg override do we still build the pkg? Must not.
- Replace hardcoded ocaml nix versions with a call to get currently available version from ocaml-ng.
- Make sure that unsupported compiler combinations error out.
- compiler: base|system, options package (warn on pkg with compiler flag?)
- compiler: variants, no valid version in nix
- Add self pkg to OPAMPATH[0]
- Use rec in lock.
- Do not include opt deps in lock.
- Include expanded patch/build/install commands in lock file.
- This is not easy because substs need to happen during patch phase, which requires var lookup.
- Ensure that strings, not paths, are passed to build/opamFiles.
- Using toString is not sufficient, the lock file will contain an absolute path.
- If a dep is already in *buildInputs, does it need to be in nativeBuildInputs?
- Test substs in a patch:
- There are no more nulls in lock file, avoid checks.
- Consider using attrsets (name => x) for representing deps to avoid duplicates when (++).
- Add support for local repos.
- Host's OPAMPATH is used when -i is not passed to develop for shell target.
- Formatting dune files is slow with vscode.
- Which uses
nix develop -i -c $prog $args
.
- Which uses
- Can we symlinkJoin an opam root?
- How to get compatibility with OCaml Platform? Can we fake opam's CLI?
- Pass
verbosity
to top-level onix attrset. - Fetch the repository before passing it to onix lock.
- Input path does not currently support
opam
files because the package name cannot be extracted. - Do we need the "root" version or can we use "dev" in the lock file?
- Removed root version.
- It's currently impossible to avoid reading root packages when opam deps are passed.
- Deps: support overriding to nixpkgs package and providing remote opam URL.
- SIGSEGV when the path contains a large file (during gitignore?).
- Better roots tracking (for deps with constraints)?
- Activate dep flags for a selected list of deps?
- Allow passing dep flags (test, doc, dev-setup) to each dependency.
- Changing the repo hash invalidates cache even if opam files did not change? Is it possible to depend on opam file contents?
- Fixed.
- Fix lock var generation when not all vars are passed.
- When evaluating
arch
use a "delayed" env var version. - Document that opam vars can be added to drv.
- Install repo's opam file.
- When running
nix profile install github:odis-labs/onix
why are so manny deps fetched (like clang). - Lookup all opam files by default on onix lock.
- Improve verbosity of onix lock.
- Add a shell hook to shell to check if there are any opam variables.