summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2025-12-08 23:36:55 +0100
committerstuebinm2025-12-08 23:36:55 +0100
commitcd4f383303700146524d367e8178e50a44d3cfd5 (patch)
treec84eaa057bf7ea24d06de992bd7bb8ecd4279640
parent2dfd9133f857d1f11de8ba6bbc0230c9fe54de9a (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
-rw-r--r--home/packages.nix1
-rw-r--r--inputs.nix25
-rw-r--r--npins/sources.json102
3 files changed, 128 insertions, 0 deletions
diff --git a/home/packages.nix b/home/packages.nix
index 415d963..2bdee84 100644
--- a/home/packages.nix
+++ b/home/packages.nix
@@ -30,6 +30,7 @@ in
wineWowPackages.full sops xdg-utils exiftool
mercurial darcs git-annex-remote-remarkable2 git-who
rlwrap
+ inputs.ocaml-forester.legacyPackages.${system}.forester
# graphical utils
kitty
# gnss things
diff --git a/inputs.nix b/inputs.nix
index b31981b..9cb3bf3 100644
--- a/inputs.nix
+++ b/inputs.nix
@@ -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
diff --git a/npins/sources.json b/npins/sources.json
index 7ccad94..94f72f0 100644
--- a/npins/sources.json
+++ b/npins/sources.json
@@ -61,6 +61,22 @@
"url": null,
"hash": "1iiplqa731ldha728xk2fi36n87p20hnzf35g21jli1dlknw388f"
},
+ "flake-compat": {
+ "type": "GitRelease",
+ "repository": {
+ "type": "GitHub",
+ "owner": "edolstra",
+ "repo": "flake-compat"
+ },
+ "pre_releases": false,
+ "version_upper_bound": null,
+ "release_prefix": null,
+ "submodules": false,
+ "version": "v1.1.0",
+ "revision": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
+ "url": "https://api.github.com/repos/edolstra/flake-compat/tarball/v1.1.0",
+ "hash": "19d2z6xsvpxm184m41qrpi1bplilwipgnzv9jy17fgw421785q1m"
+ },
"flake-utils": {
"type": "GitRelease",
"repository": {
@@ -138,6 +154,19 @@
"url": null,
"hash": "0lgfg939gfn4yifyib7f88gvcl4y8p7jjvq5k6ia8q68lw240wsy"
},
+ "mirage-opam-overlays": {
+ "type": "Git",
+ "repository": {
+ "type": "GitHub",
+ "owner": "dune-universe",
+ "repo": "mirage-opam-overlays"
+ },
+ "branch": "main",
+ "submodules": false,
+ "revision": "eddcd1bc7e035392596b603d23dde67a88e6f6bc",
+ "url": "https://github.com/dune-universe/mirage-opam-overlays/archive/eddcd1bc7e035392596b603d23dde67a88e6f6bc.tar.gz",
+ "hash": "09cwhnnmphicm4j6figds2ckagbnypdmcqmbgcszjn6zzll5fymx"
+ },
"nixos-mailserver": {
"type": "Git",
"repository": {
@@ -189,6 +218,79 @@
"url": null,
"hash": "1kq34zk7k6rg9k8frvx51hl1ldqqbfgvhm9f827b5a4c0rx28dah"
},
+ "ocaml-forester": {
+ "type": "GitRelease",
+ "repository": {
+ "type": "Git",
+ "url": "https://git.sr.ht/~jonsterling/ocaml-forester"
+ },
+ "pre_releases": false,
+ "version_upper_bound": null,
+ "release_prefix": null,
+ "submodules": false,
+ "version": "5.0",
+ "revision": "5ceee0e7d20febc0552caad0f71aa01750574d43",
+ "url": null,
+ "hash": "1ajajlg1yksk666mp5xf0ipy0c2r4pz650mrcprm45rf76xxjmj9"
+ },
+ "opam-nix": {
+ "type": "Git",
+ "repository": {
+ "type": "GitHub",
+ "owner": "tweag",
+ "repo": "opam-nix"
+ },
+ "branch": "main",
+ "submodules": false,
+ "revision": "98ca8f4401e996aeac38b6f14bf3a82d85b7add7",
+ "url": "https://github.com/tweag/opam-nix/archive/98ca8f4401e996aeac38b6f14bf3a82d85b7add7.tar.gz",
+ "hash": "0iwxpacx7dzqyvnilsy54bzaf23f5yvmm155qkw3i6yxygav2xvm"
+ },
+ "opam-overlays": {
+ "type": "Git",
+ "repository": {
+ "type": "GitHub",
+ "owner": "dune-universe",
+ "repo": "opam-overlays"
+ },
+ "branch": "master",
+ "submodules": false,
+ "revision": "d5c12f6d5c7909e6119a82bc4aba682ac3110b2d",
+ "url": "https://github.com/dune-universe/opam-overlays/archive/d5c12f6d5c7909e6119a82bc4aba682ac3110b2d.tar.gz",
+ "hash": "199qrblnd9mblr8l815wibmc147qinyvkqqi2gjmby76g3aw1h4x"
+ },
+ "opam-repository": {
+ "type": "GitRelease",
+ "repository": {
+ "type": "GitHub",
+ "owner": "ocaml",
+ "repo": "opam-repository"
+ },
+ "pre_releases": false,
+ "version_upper_bound": null,
+ "release_prefix": null,
+ "submodules": false,
+ "version": "1.2.0",
+ "revision": "62aabc825803c9dbf126488219524e68d74cd41c",
+ "url": "https://api.github.com/repos/ocaml/opam-repository/tarball/1.2.0",
+ "hash": "1rk665nzczykyxxs7c7kp2hgy49sn3alvcw15n7gsxm9qyxw0agz"
+ },
+ "opam2json": {
+ "type": "GitRelease",
+ "repository": {
+ "type": "GitHub",
+ "owner": "tweag",
+ "repo": "opam2json"
+ },
+ "pre_releases": false,
+ "version_upper_bound": null,
+ "release_prefix": null,
+ "submodules": false,
+ "version": "v0.4",
+ "revision": "562752a30aaff8985890ef5a2049a82247fc4b0f",
+ "url": "https://api.github.com/repos/tweag/opam2json/tarball/v0.4",
+ "hash": "00z4iqyl1x27nhkn89y771jl0iyqi2kfk8mq55nh0m798xnxz5g6"
+ },
"playground": {
"type": "Git",
"repository": {