camlp4: fix for OCaml-4.03
This commit is contained in:
parent
03c2b449f8
commit
731b616fdb
@ -1,42 +0,0 @@
|
|||||||
{stdenv, fetchzip, which, ocaml, ocamlbuild}:
|
|
||||||
|
|
||||||
assert stdenv.lib.versionAtLeast ocaml.version "4.02";
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "camlp4-${version}";
|
|
||||||
version = "4.03+1";
|
|
||||||
|
|
||||||
src = fetchzip {
|
|
||||||
url = "https://github.com/ocaml/camlp4/archive/${version}.tar.gz";
|
|
||||||
sha256 = "1f2ndch6f1m4fgnxsjb94qbpwjnjgdlya6pard44y6n0dqxi1wsq";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ which ocaml ocamlbuild ];
|
|
||||||
|
|
||||||
dontAddPrefix = true;
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
configureFlagsArray=(
|
|
||||||
--bindir=$out/bin
|
|
||||||
--libdir=$out/lib/ocaml/${ocaml.version}/site-lib
|
|
||||||
--pkgdir=$out/lib/ocaml/${ocaml.version}/site-lib
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
|
|
||||||
postConfigure = ''
|
|
||||||
substituteInPlace camlp4/META.in \
|
|
||||||
--replace +camlp4 $out/lib/ocaml/${ocaml.version}/site-lib/camlp4
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
makeFlags = "all";
|
|
||||||
|
|
||||||
installTargets = "install install-META";
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "A software system for writing extensible parsers for programming languages";
|
|
||||||
homepage = https://github.com/ocaml/camlp4;
|
|
||||||
platforms = ocaml.meta.platforms or [];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +1,25 @@
|
|||||||
{stdenv, fetchzip, which, ocaml}:
|
{ stdenv, fetchzip, which, ocaml, ocamlbuild }:
|
||||||
|
|
||||||
assert stdenv.lib.versionAtLeast ocaml.version "4.02";
|
let param = {
|
||||||
|
"4.02.3" = {
|
||||||
|
version = "4.02+6";
|
||||||
|
sha256 = "06yl4q0qazl7g25b0axd1gdkfd4qpqzs1gr5fkvmkrcbz113h1hj"; };
|
||||||
|
"4.03.0" = {
|
||||||
|
version = "4.03+1";
|
||||||
|
sha256 = "1f2ndch6f1m4fgnxsjb94qbpwjnjgdlya6pard44y6n0dqxi1wsq"; };
|
||||||
|
}."${ocaml.version}";
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "camlp4-${version}";
|
name = "camlp4-${version}";
|
||||||
version = "4.02+6";
|
inherit (param) version;
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://github.com/ocaml/camlp4/archive/${version}.tar.gz";
|
url = "https://github.com/ocaml/camlp4/archive/${version}.tar.gz";
|
||||||
sha256 = "06yl4q0qazl7g25b0axd1gdkfd4qpqzs1gr5fkvmkrcbz113h1hj";
|
inherit (param) sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ which ocaml ];
|
buildInputs = [ which ocaml ocamlbuild ];
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
|
||||||
@ -28,7 +36,6 @@ stdenv.mkDerivation rec {
|
|||||||
--replace +camlp4 $out/lib/ocaml/${ocaml.version}/site-lib/camlp4
|
--replace +camlp4 $out/lib/ocaml/${ocaml.version}/site-lib/camlp4
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
makeFlags = "all";
|
makeFlags = "all";
|
||||||
|
|
||||||
installTargets = "install install-META";
|
installTargets = "install install-META";
|
||||||
|
@ -58,9 +58,7 @@ let
|
|||||||
camlidl = callPackage ../development/tools/ocaml/camlidl { };
|
camlidl = callPackage ../development/tools/ocaml/camlidl { };
|
||||||
|
|
||||||
camlp4 =
|
camlp4 =
|
||||||
if lib.versionOlder "4.03" ocaml.version
|
if lib.versionOlder "4.02" ocaml.version
|
||||||
then callPackage ../development/tools/ocaml/camlp4/4_03.nix { }
|
|
||||||
else if lib.versionOlder "4.02" ocaml.version
|
|
||||||
then callPackage ../development/tools/ocaml/camlp4 { }
|
then callPackage ../development/tools/ocaml/camlp4 { }
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
@ -707,7 +705,7 @@ in rec
|
|||||||
|
|
||||||
ocamlPackages_4_02 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.02.nix { }) (self: super: { });
|
ocamlPackages_4_02 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.02.nix { }) (self: super: { });
|
||||||
|
|
||||||
ocamlPackages_4_03 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.02.nix { }) (self: super: { });
|
ocamlPackages_4_03 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.03.nix { }) (self: super: { });
|
||||||
|
|
||||||
ocamlPackages_latest = ocamlPackages_4_03;
|
ocamlPackages_latest = ocamlPackages_4_03;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user