pijul nest
guest [sign in]

Adding an example

pmeunier
Jun 7, 2025, 12:42 PM
D7MVXDG2LFGDBMVK7UES3XJCP3XKHDTEDABK5BBR7LHLR767UNGAC

Dependencies

Change contents

  • file addition: examples (d--r------)
    [2.1]
  • file addition: hello (d--r------)
    [0.20]
  • file addition: hello.c (----------)
    [0.39]
    #include <stdio.h>
    int main() {
    printf("Hello, world!\n");
    }
  • file addition: build.ml (----------)
    [0.39]
    open Elpe
    open Lwt.Syntax
    let _ =
    build
    (object (self)
    inherit std_derivation
    method name = "test"
    method! src = self#local_src "."
    method! build_inputs =
    Lwt.return
    [
    (ubuntu "gcc" :> derivation);
    (ubuntu "libc6-dev" :> derivation);
    (ubuntu "make" :> derivation);
    (ubuntu "coreutils" :> derivation);
    (ubuntu "libstdc++-13-dev" :> derivation);
    ]
    end)
  • file addition: Makefile (----------)
    [0.39]
    all:
    gcc -o hello hello.c
    install:
    install -D --mode 555 hello ${DESTDIR}/usr/bin/hello