Method: ConfCtl::NixBuild#run

Defined in:
lib/confctl/nix_build.rb

#run {|type, progress, total, path| ... } ⇒ Object

Yield Parameters:

  • type (:build, :fetch)
  • progress (Integer)
  • total (Integer)
  • path (String)


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/confctl/nix_build.rb', line 18

def run(&block)
  cmd = SystemCommand.new

  line_buf = StdLineBuffer.new do |_out, err|
    parse_line(err, &block) if err && block
  end

  ret = cmd.run(
    'nix-build',
    *args,
    env: { 'NIX_PATH' => build_nix_path(swpin_paths) },
    &line_buf.feed_block
  )

  line_buf.flush
  ret
end