https://github.com/stencila/nixta
📦 A package manager based on Nix
https://github.com/stencila/nixta
Last synced: about 1 year ago
JSON representation
📦 A package manager based on Nix
- Host: GitHub
- URL: https://github.com/stencila/nixta
- Owner: stencila
- License: apache-2.0
- Archived: true
- Created: 2018-12-16T20:09:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-17T22:20:38.000Z (about 2 years ago)
- Last Synced: 2025-03-25T03:28:58.222Z (about 1 year ago)
- Language: Nix
- Homepage:
- Size: 2.56 MB
- Stars: 19
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
## 📦 Nixta
### A package manager based on Nix
[Nix](https://nixos.org/nix/) is a superbly well designed and powerful cross-platform package manager. But it's also got a very steep learning curve. Even for experienced programmers it can be daunting to use.
Nixta is a thin, sugary wrapper around Nix to make it sweeter to use 🍭! It takes a JSON (or YAML) definition of a reproducible computing [`Environment`](https://stencila.github.io/schema/Environment) and builds a Nix environment for it.
## Status
💀: Nixta was started in 2018 as an experiment into what an easier interface to Nix might look like - with a focus on reproducible data science. There are now, in 2024, several projects with similar aims that are much further along (and Nix flakes are now a thing). So it's well time to archive this repo.
If you are here, and you haven't already, you'll probably want to check out:
- [`devbox`](https://github.com/jetify-com/devbox)
- [`devenv`](https://github.com/cachix/devenv)
- [`flox`](https://github.com/flox/flox)
## Demo
> Note: This demo uses the previous name for this tool, "Nixster".
## Install
Nixta is available as a pre-built, standalone [command line tool](#command-line-tool), a [Node package](#node-package), or in [Docker image](#docker-image).
For the command line tool and the Node package you will also need to have [Nix installed](https://nixos.org/nix/download.html):
```bash
curl https://nixos.org/nix/install | sh
```
### Command line tool
#### Linux
To install the latest release of the `nixta` command line tool to `~/.local/bin/` just use,
```bash
curl -L https://raw.githubusercontent.com/stencila/nixta/master/install.sh | bash
```
To install a specific version, append `-s vX.X.X` e.g.
```bash
curl -L https://raw.githubusercontent.com/stencila/nixta/master/install.sh | bash -s v0.1.1
```
Or, if you'd prefer to do things manually, or place Nixta elewhere, download `nixta-linux-x64.tar.gz` for the [latest release](https://github.com/stencila/nixta/releases/), and then
```bash
tar xvf nixta-linux-x64.tar.gz # unzip the download
sudo mkdir -p /user/local/bin/nixta-v0.1.1 # create a directory for it
sudo mv -f nixta /user/local/bin/nixta-v0.1.1 # move it there
sudo ln -sf nixta-v0.1.1/nixta /user/local/bin/nixta # create a link to the executable
sudo nixta --version # run once to setup necessary files and folders
```
#### MacOS and Windows
Binaries are not yet available.
### Node package
Currently you will need to install the package via this repo (not yet published to NPM):
```bash
git clone git@github.com:stencila/nixta.git
cd nixta
npm install
```
To test the CLI more conveniently you can add an alias to your shell e.g.
```bash
alias nixta='npx ts-node src/cli.ts'
```
Or, if you want to use the CLI outside of this directory:
```bash
alias nixta='/path/to/nixta/node_modules/.bin/ts-node --project /path/to/nixta/tsconfig.json /path/to/nixta/src/cli.ts'
```
### Docker image
Instead of installing Nix and Nixta you can use the `stencila/nixta` Docker image:
```bash
make docker docker-interact
```