mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
ref(nix): export lib
This commit is contained in:
parent
73afd2e280
commit
5b8e87c7a4
8 changed files with 30 additions and 6 deletions
30
nix/custom/necrolib.nix
Normal file
30
nix/custom/necrolib.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
pkgs,
|
||||
opam-nix,
|
||||
system,
|
||||
version ? "v0.14.7.1",
|
||||
}: let
|
||||
pname = "necrolib";
|
||||
|
||||
hashes = {
|
||||
"v0.14.7.1" = "sha256-rFYzNFsT7LIXzWxOogoJd9vh+ywI2N1GE77tnYO7keg=";
|
||||
"v0.14.8" = "sha256-ooc1DfTf4k9vcR2aU6CYzaGCDy4XvX98tvfzTLCljSc=";
|
||||
};
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://gitlab.inria.fr/skeletons/necro/-/archive/${version}/necro-${version}.tar.gz";
|
||||
hash = hashes.${version};
|
||||
};
|
||||
|
||||
on = opam-nix.lib.${system};
|
||||
query = {ocaml-base-compiler = "4.14.1";};
|
||||
|
||||
scope = on.buildDuneProject {} pname src query;
|
||||
|
||||
overlay = self: super: {
|
||||
# credits: balsoft
|
||||
# https://github.com/tweag/opam-nix/discussions/71#discussioncomment-8344504
|
||||
necrolib = super.necrolib.overrideAttrs (oa: {inherit src;});
|
||||
};
|
||||
in
|
||||
(scope.overrideScope' overlay).${pname}
|
||||
Loading…
Add table
Add a link
Reference in a new issue