mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 19:45:54 +00:00
336ac16838
A bit of a pitfall of // is that it doesn't merge recursively which often leads to unintended deletion in meta sets: If meta is in args it is also present in the set right of the // operator which means the right value is used to replace the left value completely. This throws away anything extra we've set in the meta set in args. This is fixed by this comment, allowing the descriptions and broken = true; set in janestreet/old.nix to propagate to the output meta sets.
30 lines
536 B
Nix
30 lines
536 B
Nix
{ lib, fetchFromGitHub, buildDunePackage, defaultVersion ? "0.14.0" }:
|
|
|
|
{ pname
|
|
, version ? defaultVersion
|
|
, hash
|
|
, minimumOCamlVersion ? "4.08"
|
|
, doCheck ? true
|
|
, ...}@args:
|
|
|
|
buildDunePackage (args // {
|
|
useDune2 = true;
|
|
inherit version;
|
|
|
|
inherit minimumOCamlVersion;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "janestreet";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = hash;
|
|
};
|
|
|
|
inherit doCheck;
|
|
|
|
meta = {
|
|
license = lib.licenses.mit;
|
|
homepage = "https://github.com/janestreet/${pname}";
|
|
} // args.meta;
|
|
})
|