![Profpatsch](/assets/img/avatar_default.png)
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
28 lines
859 B
Nix
28 lines
859 B
Nix
{lib, stdenv, fetchurl, ocaml, findlib, camlp4}:
|
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "3.12"
|
|
|| stdenv.lib.versionAtLeast ocaml.version "4.03"
|
|
then throw "type_conv-108.08.00 is not available for OCaml ${ocaml.version}" else
|
|
|
|
stdenv.mkDerivation {
|
|
name = "ocaml-type_conv-108.08.00";
|
|
|
|
src = fetchurl {
|
|
url = "https://ocaml.janestreet.com/ocaml-core/108.08.00/individual/type_conv-108.08.00.tar.gz";
|
|
sha256 = "08ysikwwp69zvc147lzzg79nwlrzrk738rj0ggcfadi8h5il42sl";
|
|
};
|
|
|
|
buildInputs = [ocaml findlib camlp4];
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://ocaml.janestreet.com/";
|
|
description = "Support library for OCaml preprocessor type conversions";
|
|
license = licenses.asl20;
|
|
branch = "108";
|
|
platforms = ocaml.meta.platforms or [];
|
|
maintainers = with maintainers; [ maggesi ];
|
|
};
|
|
}
|