/nix-command-store-plugin

Arbitrary commands as remote Nix stores

Primary LanguageC++GNU Lesser General Public License v2.1LGPL-2.1

nix-command-store-plugin

This currently relies on NixOS/nix#1713

Nix 2.0 plugin to create a command:// store. The store specifies a command to execute to build derivations. It can be used as a remote builder:

nix-build example.nix \
  --option plugin-files libnix-command-store.dylib \
  --builders 'command:///etc/nix/build-via-docker.sh x86_64-linux'

For example, a command using Docker on a remote host:

#!/bin/sh

if [ "$1" == "master" ]; then
  echo "started"
else
  ssh build-server docker run -i nix-2.0 nix-daemon --stdio
fi