Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luispedro/nixml
NIX + YAML for easy to use reproducible environments
https://github.com/luispedro/nixml
nix python reproducible-research yaml
Last synced: 11 days ago
JSON representation
NIX + YAML for easy to use reproducible environments
- Host: GitHub
- URL: https://github.com/luispedro/nixml
- Owner: luispedro
- License: mit
- Created: 2019-03-11T05:38:24.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-11-13T00:19:49.000Z (about 1 year ago)
- Last Synced: 2025-01-11T19:01:58.292Z (22 days ago)
- Topics: nix, python, reproducible-research, yaml
- Language: Python
- Size: 41 KB
- Stars: 73
- Watchers: 5
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
# NIX-ML : Easy, reproducible, environments with Nix + YAML
Simple, perfectly reproducible, environments with [nix](https://nixos.org)
specified using an YAML file.Example, write to a file called `env.nml`:
nixml: v0.0
snapshot: stable-20.03
packages:
- lang: python
version: 2
modules:
- numpy
- scipy
- matplotlib
- mahotas
- jupyter
- scikitlearnNow, run
```bash
nixml shell
```and you will be dropped into an environment containing the packages listed
above, as was up to date in March 2020. Conceptually, the environment will
always be generated from scratch, but caching means that the first time will
take significantly longer (including, it will download all dependencies).
Afterwards, it should take a few seconds at most.This environment will be like a typical _conda/pip/virtualenv/..._ environment:
if will place the corresponding binaries at the front of the `PATH` so that
they are picked with high priority, but, alternatively, you can generate a
_pure environment_, which will contain **only the packages that you specify**.
This avoids accidental use of packages that are not part of the environment:```bash
nixml shell --pure
```Finally, you can run
```bash
nixml generate
```to just create the `nixml.nix` corresponding to the enviroment.
## Dependencies
- Python
- [nix](https://nixos.org)## NIXML Format
It's a YaML file
`nixml`: version of nixml to use. Currently, only `v0.0` is supported.
`snapshot`: The general syntax is `{stable,unstable}-{year}.{month}`. Snapshots
since 19.03 are available.`packages`: A list of packages, which are grouped into language blocks.
Currently supported:- `python`: Python language environment, specify the version (`version`) and `modules`.
- `texlive`: Texlive packages
- `nix`: Generic packages (i.e., `vim` or `bash`)## Author
- [Luis Pedro Coelho](http://luispedro.org) (email:
[[email protected]](mailto:[email protected]) on twitter:
[@luispedrocoelho](https://twitter.com/luispedrocoelho))