diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/tools/ocaml/camlp4 | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/tools/ocaml/camlp4')
-rw-r--r-- | nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix b/nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix new file mode 100644 index 000000000000..2974ca965fdc --- /dev/null +++ b/nixpkgs/pkgs/development/tools/ocaml/camlp4/default.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchzip, which, ocaml, ocamlbuild }: + +let param = { + "4.02" = { + version = "4.02+6"; + sha256 = "06yl4q0qazl7g25b0axd1gdkfd4qpqzs1gr5fkvmkrcbz113h1hj"; }; + "4.03" = { + version = "4.03+1"; + sha256 = "1f2ndch6f1m4fgnxsjb94qbpwjnjgdlya6pard44y6n0dqxi1wsq"; }; + "4.04" = { + version = "4.04+1"; + sha256 = "1ad7rygqjxrc1im95gw9lp8q83nhdaf383f2808f1p63yl42xm7k"; }; + "4.05" = { + version = "4.05+1"; + sha256 = "0wm795hpwvwpib9c9z6p8kw2fh7p7b2hml6g15z8zry3y7w738sv"; }; + "4.06" = { + version = "4.06+1"; + sha256 = "0fazfw2l7wdmbwnqc22xby5n4ri1wz27lw9pfzhsbcdrighykysf"; }; + "4.07" = { + version = "4.07+1"; + sha256 = "0cxl4hkqcvspvkx4f2k83217rh6051fll9i2yz7cw6m3bq57mdvl"; }; + }."${ocaml.meta.branch}"; +in + +stdenv.mkDerivation rec { + name = "camlp4-${version}"; + inherit (param) version; + + src = fetchzip { + url = "https://github.com/ocaml/camlp4/archive/${version}.tar.gz"; + inherit (param) sha256; + }; + + 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"; + + dontStrip = true; + + 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 []; + }; +} |