1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-16 11:43:21 +03:00
mobile-nixos/bin/build
2018-06-23 22:08:24 -04:00

25 lines
433 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(
"nix-build", "-A", "all",
"-I", "nixpkgs=channel:nixpkgs-unstable",
"--argstr", "device", DEVICE,
*ARGV,
exec: true
)
# vim: ft=ruby