lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-ng.ocamlPackages_4_07.seq: dummy package with just a META file

Imitate opam which installs the real seq package only for OCaml < 4.07 and only a META file for OCaml >= 4.07.

authored by

Théo Zimmermann and committed by
Vincent Laporte
10d7bfed 8bc70c93

+32 -11
+28 -11
pkgs/development/ocaml-modules/seq/default.nix
··· 1 1 { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild }: 2 2 3 - stdenv.mkDerivation rec { 3 + stdenv.mkDerivation ({ 4 4 version = "0.1"; 5 - name = "ocaml${ocaml.version}-seq-${version}"; 5 + name = "ocaml${ocaml.version}-seq-0.1"; 6 + 7 + meta = { 8 + license = stdenv.lib.licenses.lgpl21; 9 + maintainers = [ stdenv.lib.maintainers.vbgl ]; 10 + homepage = "https://github.com/c-cube/seq"; 11 + inherit (ocaml.meta) platforms; 12 + }; 13 + 14 + } // (if stdenv.lib.versionOlder ocaml.version "4.07" then { 6 15 7 16 src = fetchFromGitHub { 8 17 owner = "c-cube"; 9 18 repo = "seq"; 10 - rev = version; 19 + rev = "0.1"; 11 20 sha256 = "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"; 12 21 }; 13 22 ··· 15 24 16 25 createFindlibDestdir = true; 17 26 18 - meta = { 19 - description = "Compatibility package for OCaml’s standard iterator type starting from 4.07"; 20 - license = stdenv.lib.licenses.lgpl21; 21 - maintainers = [ stdenv.lib.maintainers.vbgl ]; 22 - inherit (src.meta) homepage; 23 - inherit (ocaml.meta) platforms; 24 - }; 25 - } 27 + meta.description = "Compatibility package for OCaml’s standard iterator type starting from 4.07"; 28 + 29 + } else { 30 + 31 + src = ./src-base; 32 + 33 + dontBuild = true; 34 + 35 + installPhase = '' 36 + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/seq 37 + cp META $out/lib/ocaml/${ocaml.version}/site-lib/seq 38 + ''; 39 + 40 + meta.description = "dummy backward-compatibility package for iterators"; 41 + 42 + }))
+4
pkgs/development/ocaml-modules/seq/src-base/META
··· 1 + name="seq" 2 + version="[distributed with OCaml 4.07 or above]" 3 + description="dummy backward-compatibility package for iterators" 4 + requires=""