diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/ocaml-modules/camomile/default.nix | 67 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/charInfo_width/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix | 5 | ||||
-rw-r--r-- | pkgs/development/tools/headache/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/audio/liquidsoap/full.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/typesetting/soupault/default.nix | 9 |
6 files changed, 57 insertions, 38 deletions
diff --git a/pkgs/development/ocaml-modules/camomile/default.nix b/pkgs/development/ocaml-modules/camomile/default.nix index ea2a653936821..b1178a4e8dd8a 100644 --- a/pkgs/development/ocaml-modules/camomile/default.nix +++ b/pkgs/development/ocaml-modules/camomile/default.nix @@ -1,34 +1,57 @@ -{ lib, fetchFromGitHub, buildDunePackage, ocaml, cppo }: +{ stdenv, lib, darwin, fetchFromGitHub, buildDunePackage, ocaml, cppo +, camlp-streams, dune-site +, version ? if lib.versionAtLeast ocaml.version "4.08" then "2.0.0" else "1.0.2" +}: -buildDunePackage rec { - pname = "camomile"; - version = "1.0.2"; +let params = + { + "1.0.2" = lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "camomile 1 is not available for OCaml ${ocaml.version}" { + src = fetchFromGitHub { + owner = "yoriyuki"; + repo = "camomile"; + rev = version; + sha256 = "00i910qjv6bpk0nkafp5fg97isqas0bwjf7m6rz11rsxilpalzad"; + }; - useDune2 = true; + nativeBuildInputs = [ cppo ]; - src = fetchFromGitHub { - owner = "yoriyuki"; - repo = pname; - rev = version; - sha256 = "00i910qjv6bpk0nkafp5fg97isqas0bwjf7m6rz11rsxilpalzad"; - }; + configurePhase = '' + runHook preConfigure + ocaml configure.ml --share $out/share/camomile + runHook postConfigure + ''; + + postInstall = '' + echo "version = \"${version}\"" >> $out/lib/ocaml/${ocaml.version}/site-lib/camomile/META + ''; + + }; - nativeBuildInputs = [ cppo ]; + "2.0.0" = { + src = fetchFromGitHub { + owner = "ocaml-community"; + repo = "camomile"; + rev = "v${version}"; + hash = "sha256-HklX+VPD0Ta3Knv++dBT2rhsDSlDRH90k4Cj1YtWIa8="; + }; - configurePhase = '' - runHook preConfigure - ocaml configure.ml --share $out/share/camomile - runHook postConfigure - ''; + nativeBuildInputs = lib.optional stdenv.isDarwin darwin.sigtool; - postInstall = '' - echo "version = \"${version}\"" >> $out/lib/ocaml/${ocaml.version}/site-lib/camomile/META - ''; + propagatedBuildInputs = [ camlp-streams dune-site ]; + }; + } +; in + + +buildDunePackage (params."${version}" // { + pname = "camomile"; + inherit version; meta = { - inherit (src.meta) homepage; + homepage = "https://github.com/ocaml-community/Camomile"; maintainers = [ lib.maintainers.vbgl ]; license = lib.licenses.lgpl21; description = "A Unicode library for OCaml"; }; -} +}) diff --git a/pkgs/development/ocaml-modules/charInfo_width/default.nix b/pkgs/development/ocaml-modules/charInfo_width/default.nix index aaf1811045486..ab4e53a42b352 100644 --- a/pkgs/development/ocaml-modules/charInfo_width/default.nix +++ b/pkgs/development/ocaml-modules/charInfo_width/default.nix @@ -3,13 +3,15 @@ buildDunePackage rec { pname = "charInfo_width"; version = "1.1.0"; - duneVersion = "3"; src = fetchzip { url = "https://bitbucket.org/zandoye/charinfo_width/get/${version}.tar.bz2"; sha256 = "19mnq9a1yr16srqs8n6hddahr4f9d2gbpmld62pvlw1ps7nfrp9w"; }; - propagatedBuildInputs = [ camomile result ]; + propagatedBuildInputs = [ + (camomile.override { version = "1.0.2"; }) + result + ]; meta = { homepage = "https://bitbucket.org/zandoye/charinfo_width/"; diff --git a/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix b/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix index 1a96c7adfe99d..3fde1d463cc7b 100644 --- a/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix +++ b/pkgs/development/ocaml-modules/ocaml-gettext/camomile.nix @@ -4,7 +4,10 @@ buildDunePackage { pname = "gettext-camomile"; inherit (ocaml_gettext) src version; - propagatedBuildInputs = [ camomile ocaml_gettext ]; + propagatedBuildInputs = [ + (camomile.override { version = "1.0.2"; }) + ocaml_gettext + ]; doCheck = lib.versionAtLeast ocaml.version "4.08"; checkInputs = [ ounit fileutils ]; diff --git a/pkgs/development/tools/headache/default.nix b/pkgs/development/tools/headache/default.nix index f156c5950b04c..ca6417705e104 100644 --- a/pkgs/development/tools/headache/default.nix +++ b/pkgs/development/tools/headache/default.nix @@ -13,9 +13,9 @@ buildDunePackage rec { sha256 = "sha256-BA7u09MKYMyspFX8AcAkDVA6UUG5DKAdbIDdt+b3Fc4="; }; - duneVersion = "3"; - - propagatedBuildInputs = [ camomile ]; + propagatedBuildInputs = [ + (camomile.override { version = "1.0.2"; }) + ]; meta = with lib; { homepage = "https://github.com/frama-c/${pname}"; diff --git a/pkgs/tools/audio/liquidsoap/full.nix b/pkgs/tools/audio/liquidsoap/full.nix index 81157c13782e8..5e196a5b557bc 100644 --- a/pkgs/tools/audio/liquidsoap/full.nix +++ b/pkgs/tools/audio/liquidsoap/full.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation { ocamlPackages.mm ocamlPackages.ocaml_pcre ocamlPackages.menhir ocamlPackages.menhirLib - ocamlPackages.camomile + (ocamlPackages.camomile.override { version = "1.0.2"; }) ocamlPackages.ocurl ocamlPackages.uri ocamlPackages.sedlex diff --git a/pkgs/tools/typesetting/soupault/default.nix b/pkgs/tools/typesetting/soupault/default.nix index e2b69cc7b86bc..da3b2b509b1ec 100644 --- a/pkgs/tools/typesetting/soupault/default.nix +++ b/pkgs/tools/typesetting/soupault/default.nix @@ -1,6 +1,5 @@ { lib , fetchFromGitea -, fetchpatch , ocamlPackages , soupault , testers @@ -24,14 +23,6 @@ ocamlPackages.buildDunePackage { sha256 = "nwXyOwDUbkMnyHPrvCvmToyONdbg5kJm2mt5rWrB6HA="; }; - patches = lib.lists.optional - (lib.strings.versionAtLeast "2.0.0" ocamlPackages.camomile.version) - (fetchpatch { - name = "camomile-1_x"; - url = "https://files.baturin.org/software/soupault/soupault-4.7.0-camomile-1.x.patch"; - sha256 = "V7+OUjXqWtXwjUa35MlY9iyAlqOkst9Th7DgfDXkXZg="; - }); - buildInputs = with ocamlPackages; [ base64 camomile |