1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 19:23:01 +03:00
mobile-nixos/bin/build
Samuel Dionne-Riel 162ae19c0b bin/build: isolate from system...
This will stop NIX_PATH overlays from "infecting" the builds.
2018-11-05 20:50:47 -05:00

26 lines
447 B
Ruby
Executable File

#!/usr/bin/env nix-shell
#!nix-shell -p ruby -i ruby
require_relative "../lib/rb/all.rb"
# Given a device name, instantiates `nix-build` to build
# everything needed to boot on that device.
if ARGV.count < 1 then
puts "Usage: bin/build <device-name>"
exit 1
end
DEVICE = ARGV.shift
run(
"env", "-i",
"nix-build", "-A", "all",
"-I", "nixpkgs=channel:nixpkgs-unstable",
"--argstr", "device", DEVICE,
*ARGV,
exec: true
)
# vim: ft=ruby