From 33c17a1c98f2d2673623b615b84c4321606dde09 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 4 May 2026 17:38:22 +0200 Subject: [PATCH] ocamlPackages.seq: cleanup --- .../development/ocaml-modules/seq/default.nix | 68 +++++-------------- 1 file changed, 17 insertions(+), 51 deletions(-) diff --git a/pkgs/development/ocaml-modules/seq/default.nix b/pkgs/development/ocaml-modules/seq/default.nix index 9a4a6db31ce8..e65441f3e047 100644 --- a/pkgs/development/ocaml-modules/seq/default.nix +++ b/pkgs/development/ocaml-modules/seq/default.nix @@ -1,62 +1,28 @@ { stdenv, lib, - fetchFromGitHub, ocaml, - findlib, - ocamlbuild, }: -stdenv.mkDerivation ( - { - version = "0.1"; - pname = "ocaml${ocaml.version}-seq"; +stdenv.mkDerivation { + version = "0.1"; + pname = "ocaml${ocaml.version}-seq"; - meta = { - license = lib.licenses.lgpl21; - maintainers = [ lib.maintainers.vbgl ]; - homepage = "https://github.com/c-cube/seq"; - inherit (ocaml.meta) platforms; - }; + meta = { + license = lib.licenses.lgpl21; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/c-cube/seq"; + description = "Dummy backward-compatibility package for iterators"; + inherit (ocaml.meta) platforms; + }; - } - // ( - if lib.versionOlder ocaml.version "4.07" then - { + src = ./src-base; - src = fetchFromGitHub { - owner = "c-cube"; - repo = "seq"; - rev = "0.1"; - sha256 = "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"; - }; + dontBuild = true; - nativeBuildInputs = [ - ocaml - findlib - ocamlbuild - ]; - strictDeps = true; + installPhase = '' + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/seq + cp META $out/lib/ocaml/${ocaml.version}/site-lib/seq + ''; - createFindlibDestdir = true; - - meta.description = "Compatibility package for OCaml’s standard iterator type starting from 4.07"; - - } - else - { - - src = ./src-base; - - dontBuild = true; - - installPhase = '' - mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/seq - cp META $out/lib/ocaml/${ocaml.version}/site-lib/seq - ''; - - meta.description = "Dummy backward-compatibility package for iterators"; - - } - ) -) +}