Fixed-output derivations enable the network
Dependencies
- [2]
ODUDDQRYAdding the OCaml interface - [3]
SI454P2VDocumentation and cleanup - [4]
UWQB743KFirst working shell (with ocaml code)
Change contents
- edit in src/container.rs at line 21
/// Expected output hash.pub output_hash: Option<String>, - edit in src/container.rs at line 192
let newnet = if r.output_hash.is_some() {0} else {libc::CLONE_NEWNET}; - replacement in src/container.rs at line 201
flags: (libc::CLONE_NEWPID | libc::CLONE_NEWNET | libc::CLONE_NEWNS) as u64,flags: (libc::CLONE_NEWPID | newnet | libc::CLONE_NEWNS) as u64, - edit in elpe/lib/elpegrpc.proto at line 32
optional string output_hash = 5; - replacement in elpe/lib/elpe.ml at line 58
let derivation connection ~name ~builder ~paths ~target =let req = Elpegrpc.Elpe.DerivationRequest.make ~name ~builder ~paths ~target () inlet derivation connection ~name ~builder ~paths ~target ~output_hash =let req =match output_hash with| None ->Elpegrpc.Elpe.DerivationRequest.make ~name ~builder ~paths ~target ()| Some output_hash ->Elpegrpc.Elpe.DerivationRequest.make ~name ~builder ~paths ~target~output_hash ()in - edit in elpe/lib/elpe.ml at line 232
method output_hash : string option Lwt.t = Lwt.return None - replacement in elpe/lib/elpe.ml at line 312
| pre :: post :: _ -> Lwt.return (pre ^ "\nif [[ -e Makefile ]]; then make; fi\n" ^ post)| pre :: post :: _ ->Lwt.return (pre ^ "\nif [[ -e Makefile ]]; then make; fi\n" ^ post) - replacement in elpe/lib/elpe.ml at line 322
| pre :: post :: _ -> Lwt.return (pre ^ "\nif [[ -e Makefile ]]; then make install; fi\n" ^ post)| pre :: post :: _ ->Lwt.return(pre ^ "\nif [[ -e Makefile ]]; then make install; fi\n" ^ post) - replacement in elpe/lib/elpe.ml at line 342
let* res = derivation c ~name:self#name ~builder ~paths:!extra_paths ~target:self#target inlet* output_hash = self#output_hash inlet* res =derivation c ~name:self#name ~builder ~paths:!extra_paths~target:self#target ~output_hashin