mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 19:23:01 +03:00
162ae19c0b
This will stop NIX_PATH overlays from "infecting" the builds.
26 lines
447 B
Ruby
Executable File
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
|