An open API service indexing awesome lists of open source software.

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

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
```