4a7f99d55d
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
36 lines
894 B
Nix
36 lines
894 B
Nix
{lib, stdenv, fetchurl, ocaml, findlib, easy-format}:
|
|
let
|
|
pname = "biniou";
|
|
version = "1.0.9";
|
|
webpage = "http://mjambon.com/${pname}.html";
|
|
in
|
|
|
|
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11";
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "http://mjambon.com/releases/${pname}/${name}.tar.gz";
|
|
sha256 = "14j3hrhbjqxbizr1pr8fcig9dmfzhbjjwzwyc99fcsdic67w8izb";
|
|
};
|
|
|
|
buildInputs = [ ocaml findlib easy-format ];
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
preBuild = ''
|
|
mkdir $out/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve";
|
|
homepage = webpage;
|
|
license = licenses.bsd3;
|
|
maintainers = [ maintainers.vbgl ];
|
|
platforms = ocaml.meta.platforms or [];
|
|
};
|
|
}
|