Last active
July 5, 2018 09:17
-
-
Save tomster/5cfb45030e06ffb7b91a to your computer and use it in GitHub Desktop.
Ansible playbook to build nix on FreeBSD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: | |
- nixhost | |
tasks: | |
- name: Ensure dependency packages are installed | |
pkgng: | |
name: "{{item}}" | |
state: present | |
with_items: | |
- sudo | |
- curl | |
- perl5 | |
- openssl | |
- bash | |
- pkgconf | |
- sqlite3 | |
- gmake | |
- autoconf | |
- automake | |
- git | |
- libxslt | |
- docbook-xsl-ns | |
- bison | |
- p5-DBI | |
- p5-DBD-SQLite | |
- p5-WWW-Curl | |
- gtar | |
- name: fetch nix sources | |
git: | |
repo: "https://github.com/manueljacob/nix" | |
version: "freebsd-build-fixes" | |
dest: "/home/nixbuild/nix" | |
accept_hostkey: yes | |
sudo_user: nixbuild | |
- name: bootstrap checkout | |
command: bash bootstrap.sh | |
args: | |
chdir: "/home/nixbuild/nix" | |
creates: "/home/nixbuild/nix/configure" | |
sudo_user: nixbuild | |
- name: configure checkout | |
command: bash configure | |
args: | |
chdir: "/home/nixbuild/nix" | |
creates: "/home/nixbuild/nix/config.status" | |
sudo_user: nixbuild | |
- name: build nix | |
command: gmake | |
args: | |
chdir: "/home/nixbuild/nix" | |
creates: "/home/nixbuild/nix/scripts/nix-build" | |
sudo_user: nixbuild | |
- name: install nix | |
command: gmake install | |
args: | |
chdir: "/home/nixbuild/nix" | |
creates: "/usr/local/bin/nix-build" | |
- name: create group | |
group: | |
name: nixbld | |
- name: create nixbld users | |
user: | |
name: "{{item}}" | |
groups: nixbld | |
with_items: | |
- nxbld1 | |
- nxbld2 | |
tags: foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is what I get when I try to run this: