Skip to content

Instantly share code, notes, and snippets.

@tomster
Last active July 5, 2018 09:17
Show Gist options
  • Select an option

  • Save tomster/5cfb45030e06ffb7b91a to your computer and use it in GitHub Desktop.

Select an option

Save tomster/5cfb45030e06ffb7b91a to your computer and use it in GitHub Desktop.

Revisions

  1. tomster revised this gist Oct 16, 2015. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions nixbuild.yml
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,6 @@
    ---
    - hosts:
    - nixhost
    user: tomster
    sudo: True
    sudo_user: root

    tasks:
    - name: Ensure dependency packages are installed
  2. tomster revised this gist Oct 16, 2015. 1 changed file with 16 additions and 6 deletions.
    22 changes: 16 additions & 6 deletions nixbuild.yml
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    ---
    - hosts:
    - naster-nixbuild
    user: root
    - nixhost
    user: tomster
    sudo: True
    sudo_user: root

    tasks:
    - name: Ensure dependency packages are installed
    @@ -26,10 +28,7 @@
    - p5-DBI
    - p5-DBD-SQLite
    - p5-WWW-Curl
    - name: create build user
    user:
    name: nixbuild
    createhome: yes
    - gtar
    - name: fetch nix sources
    git:
    repo: "https://github.com/manueljacob/nix"
    @@ -60,3 +59,14 @@
    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
  3. tomster revised this gist Oct 8, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion nixbuild.yml
    Original file line number Diff line number Diff line change
    @@ -42,7 +42,7 @@
    args:
    chdir: "/home/nixbuild/nix"
    creates: "/home/nixbuild/nix/configure"
    sudo_user: nixbuildyy
    sudo_user: nixbuild
    - name: configure checkout
    command: bash configure
    args:
  4. tomster created this gist Oct 8, 2015.
    62 changes: 62 additions & 0 deletions nixbuild.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,62 @@
    ---
    - hosts:
    - naster-nixbuild
    user: root

    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
    - name: create build user
    user:
    name: nixbuild
    createhome: yes
    - 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: nixbuildyy
    - 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"