diff options
| author | stuebinm | 2025-12-08 23:36:55 +0100 |
|---|---|---|
| committer | stuebinm | 2025-12-08 23:36:55 +0100 |
| commit | cd4f383303700146524d367e8178e50a44d3cfd5 (patch) | |
| tree | c84eaa057bf7ea24d06de992bd7bb8ecd4279640 /inputs.nix | |
| parent | 2dfd9133f857d1f11de8ba6bbc0230c9fe54de9a (diff) | |
home/packages: add forester
this was much too much work. to summarise:
- ocamlc is weird and does not at all play nice with nix
- nixpkgs.ocamlPackages seems to not have any good way to deal with
multiple package versions, and forester needs several different
versions than are in nixpkgs
- forester itself has a flake which one is supposed to use with Nix; it
uses tweag's opam-nix construct
- which for some bizarre reason cannot be imported the way I import all
my other flakes, and I do not understand why
- so I gave up for now and import it via flake-compat, unfortunately
tying me to an old nixpkgs pin (~June), which hopefully does not
influence too much of the output
- forester's flake's default output is a cross-compiled musl version (???)
- so use the one in legacyPackages instead
Diffstat (limited to 'inputs.nix')
| -rw-r--r-- | inputs.nix | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -65,5 +65,30 @@ let lix-overlay = import "${sources.lix-nixos-module}/overlay.nix" { lix = sources.lix // { rev = sources.lix.revision; }; }; + + + ###### Forester stuff + + flake-compat = import sources.flake-compat; + + # currently unused + opam2json = callFlake "opam2json" { + nixpkgs = nixpkgs-flake; + }; + # opam-nix does not want to be called like this; i do not know why + # opam-nix = callFlake "opam-nix"{ + # inherit (sources) opam-repository opam-overlays mirage-opam-overlays; + # inherit (inputs) flake-utils opam2json flake-compat; + # nixpkgs = nixpkgs-unstable-flake; + # }; + # so i gave up an use the flake-compat'd version instead, which uses an + # old nixpkgs pin i cannot easily change ... + opam-nix = (flake-compat { src = sources.opam-nix.outPath; }).defaultNix; + + ocaml-forester = callFlake "ocaml-forester" { + nixpkgs = nixpkgs-flake; + inherit (inputs) opam-nix flake-utils; + inherit (sources) opam-repository; + }; }; in inputs |
