From 9970b48308d95bda4970be5f6a4ef80a94c9b053 Mon Sep 17 00:00:00 2001 From: Alain Date: Mon, 14 Feb 2022 10:43:16 +0100 Subject: [PATCH] fix nix build by manually upgrading cmdliner --- .nix/cmdliner.nix | 38 ++++++++++++++++++++++++++++++++++++++ release.nix | 1 + shell.nix | 1 + 3 files changed, 40 insertions(+) create mode 100644 .nix/cmdliner.nix diff --git a/.nix/cmdliner.nix b/.nix/cmdliner.nix new file mode 100644 index 00000000..7745db14 --- /dev/null +++ b/.nix/cmdliner.nix @@ -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 = [ ]; + }; +} \ No newline at end of file diff --git a/release.nix b/release.nix index f1859d38..a21f81e2 100644 --- a/release.nix +++ b/release.nix @@ -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 { }; } diff --git a/shell.nix b/shell.nix index 9470086e..89656da8 100644 --- a/shell.nix +++ b/shell.nix @@ -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 ];