Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

camlp4: 4.02.0+1 -> 4.02+6

* Remove unneeded substitution in postConfigure
This was fixed here: https://github.com/ocaml/camlp4/commit/81ed5cf2e857c08e433d891328767ad7f07f1447

* camlp4: use fetchzip

It is considered more reliable than fetchurl

authored by

Samuel Rivas and committed by
Samuel Rivas
d516f12d 9d5508d8

+7 -9
+7 -9
pkgs/development/tools/ocaml/camlp4/default.nix
··· 1 - {stdenv, fetchurl, which, ocaml}: 2 let 3 ocaml_version = (stdenv.lib.getVersion ocaml); 4 in 5 6 assert stdenv.lib.versionAtLeast ocaml_version "4.02"; 7 8 stdenv.mkDerivation { 9 - name = "camlp4-4.02.0+1"; 10 - src = fetchurl { 11 - url = https://github.com/ocaml/camlp4/archive/4.02.0+1.tar.gz; 12 - sha256 = "0055f4jiz82rgn581xhq3mr4qgq2qgdxqppmp8i2x1xnsim4h9pn"; 13 }; 14 15 buildInputs = [ which ocaml ]; ··· 27 postConfigure = '' 28 substituteInPlace camlp4/META.in \ 29 --replace +camlp4 $out/lib/ocaml/${ocaml_version}/site-lib/camlp4 30 - substituteInPlace camlp4/config/Camlp4_config.ml \ 31 - --replace \ 32 - "Filename.concat ocaml_standard_library" \ 33 - "Filename.concat \"$out/lib/ocaml/${ocaml_version}/site-lib\"" 34 ''; 35 36
··· 1 + {stdenv, fetchzip, which, ocaml}: 2 let 3 ocaml_version = (stdenv.lib.getVersion ocaml); 4 + version = "4.02+6"; 5 + 6 in 7 8 assert stdenv.lib.versionAtLeast ocaml_version "4.02"; 9 10 stdenv.mkDerivation { 11 + name = "camlp4-${version}"; 12 + src = fetchzip { 13 + url = "https://github.com/ocaml/camlp4/archive/${version}.tar.gz"; 14 + sha256 = "06yl4q0qazl7g25b0axd1gdkfd4qpqzs1gr5fkvmkrcbz113h1hj"; 15 }; 16 17 buildInputs = [ which ocaml ]; ··· 29 postConfigure = '' 30 substituteInPlace camlp4/META.in \ 31 --replace +camlp4 $out/lib/ocaml/${ocaml_version}/site-lib/camlp4 32 ''; 33 34