fix nix build by manually upgrading cmdliner

This commit is contained in:
Alain 2022-02-14 10:43:16 +01:00
parent d704998f81
commit 9970b48308
3 changed files with 40 additions and 0 deletions

38
.nix/cmdliner.nix Normal file
View File

@ -0,0 +1,38 @@
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
let
pname = "cmdliner";
in
assert lib.versionAtLeast ocaml.version "4.01.0";
let param =
{
version = "1.1.0";
hash = "sha256-irWd4HTlJSYuz3HMgi1de2GVL2qus0QjeCe1WdsSs8Q=";
}
; in
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-${pname}-${version}";
inherit (param) version;
src = fetchurl {
url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
inherit (param) hash;
};
nativeBuildInputs = [ ocaml ocamlbuild findlib ];
buildInputs = [ topkg ];
propagatedBuildInputs = [ result ];
inherit (topkg) buildPhase installPhase;
meta = with lib; {
homepage = "https://erratique.ch/software/cmdliner";
description = "An OCaml module for the declarative definition of command line interfaces";
license = licenses.bsd3;
platforms = ocaml.meta.platforms or [];
maintainers = [ ];
};
}

View File

@ -4,4 +4,5 @@ with pkgs;
ocamlPackages.callPackage ./. {
bindlib = ocamlPackages.callPackage ./.nix/bindlib.nix { };
unionfind = ocamlPackages.callPackage ./.nix/unionfind.nix { };
cmdliner = ocamlPackages.callPackage ./.nix/cmdliner.nix { };
}

View File

@ -5,6 +5,7 @@ let
pkg = ocamlPackages.callPackage ./. {
bindlib = ocamlPackages.callPackage ./.nix/bindlib.nix { };
unionfind = ocamlPackages.callPackage ./.nix/unionfind.nix { };
cmdliner = ocamlPackages.callPackage ./.nix/cmdliner.nix { };
};
in mkShell {
inputsFrom = [ pkg ];