Nix-Powered Development with OCaml

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. ocaml-flake-example

    An overly elaborate example of building a ‘Hello World’ package with Nix flakes, OCaml, and Dune

    If you are mainly using OCaml and do not mind flakes, this was a very good starting point for me: https://github.com/brendanzab/ocaml-flake-example/blob/main/...

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. opam-nix

    Turn opam-based OCaml projects into Nix derivations

    I don't know; that's why I'm asking. Maybe buildOpamPackage already does it? https://github.com/tweag/opam-nix#buildOpamProject

  4. nix-alien

    Run unpatched binaries on Nix/NixOS

    copy the extracted files over to the nix output dir, and patch-elf all the binaries to link to the nix-version of the dynamic lib.

    This sounds more difficult than it is, the result will be a copied over binary file that has its “libc.so” and other dynamic libs replaced in the ELF-header with “/nix/store/hdjdewuieu737-libc/libc.so”. I recommend looking up a package in nixpkgs which has a similar install story, that’s the easiest way to write a new package.

    In case you only want to run it locally https://github.com/thiagokokada/nix-alien and similar programs work fine with the binary.

  5. nixos-apple-silicon

    Resources to install NixOS bare metal on Apple Silicon Macs [maintainers=@tpwrules,@flokli,@yuyuyureka]

    Most hardcore Nix users/developers I have met have been suspicious for Flakes for several years, so your point rings true.

    That said, it feels like they are slowly coming to terms with it and just accepting it as default. Here are two examples of maintainers eventually accepting flake support on their repos after initial hesitation [1][2].

    [1] https://github.com/tpwrules/nixos-apple-silicon/pull/47

  6. mobile-nixos

    📱 (rebooting... please wait...)

  7. lanzaboote

    Secure Boot for NixOS [maintainers=@blitz @raitobezarius @nikstur]

    Afaik it's not finished yet, but there recently has been quite a lot of activity regarding secureboot for nixos https://github.com/nix-community/lanzaboote/

  8. devenv

    Fast, Declarative, Reproducible, and Composable Developer Environments using Nix

    ```

    Recently also shipped 0.6 with container generation support: https://devenv.sh/containers/

    Let me know if you give it a try :)

  9. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  10. oxcaml

    OCaml - Oxidized!

    I was hoping this post would mention using OCaml with flambda[1] enabled. At least for my work, flambda seems to yield a ~10% speed up when compiling things. Can you get OCaml binaries with flambda enabled through Nix? With opam, I currently have to compile OCaml myself to enable it, as I am not aware of any binaries being distributed.

    [1] https://github.com/ocaml-flambda/flambda-backend

  11. book

    V2 of Real World OCaml (by realworldocaml)

    I don't think they're wrong

    the Jane Street side are quite prolific with blog posts etc

    as a newcomer to OCaml one of the first, and nicer-looking, intro resources you'll likely encounter is the Real World OCaml book https://dev.realworldocaml.org/ which unfortunately does everything using Base instead of the stdlib

    Personally that didn't sit right to me and I prefer to use the stdlib by default (which seems fine and not in need of a wholesale replacement)

  12. nixpkgs

    Nix Packages collection & NixOS

    The nix option for it was added in 2017:

    https://github.com/NixOS/nixpkgs/pull/32946

    If you find it important, I'd encourage opening a PR to ask for flambda to be enabled by default at https://github.com/NixOS/nixpkgs/issues/new/choose.

    Especially if the ocaml community typically enables flambda by default these days.

  13. tumbleweed

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

Did you know that Nix is
the 29th most popular programming language
based on number of references?