diff options
author | Jules Aguillon <jules@j3s.fr> | 2023-07-05 17:21:04 +0200 |
---|---|---|
committer | Jules Aguillon <jules@j3s.fr> | 2023-07-05 17:21:04 +0200 |
commit | fb98ebb9a05fefa25585ef78000b40744e8d4d17 (patch) | |
tree | 9faabf43a7841383cf9ecab3a90e319bd93462bd /pkgs/development/tools/ocaml | |
parent | a5ca6a0f2ee8b2c8aa2cca64a06bd5652ad28a4b (diff) |
ocamlPackages.ocamlformat: Move into 'ocamlPackages'
Move the definitions of OCamlformat packages into ocamlPackages. This moves the package containing the tool closer to the definition of the library. It's now possible to build OCamlformat using a different version of OCaml than the default. `ocamlformat`, `ocamlPackages.ocamlformat` and `ocaml-ng.ocamlPackages_<lastest>.ocamlformat` are all aliases.
Diffstat (limited to 'pkgs/development/tools/ocaml')
-rw-r--r-- | pkgs/development/tools/ocaml/ocamlformat/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/ocamlformat/generic.nix | 31 |
2 files changed, 0 insertions, 49 deletions
diff --git a/pkgs/development/tools/ocaml/ocamlformat/default.nix b/pkgs/development/tools/ocaml/ocamlformat/default.nix deleted file mode 100644 index f0f38777f1c2d..0000000000000 --- a/pkgs/development/tools/ocaml/ocamlformat/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, fetchurl, fetchzip, callPackage }: - -# Older versions should be removed when their usage decrease -# This script scraps Github looking for OCamlformat's options and versions usage: -# https://gist.github.com/Julow/110dc94308d6078225e0665e3eccd433 - -rec { - ocamlformat_0_19_0 = ocamlformat.override { version = "0.19.0"; }; - ocamlformat_0_20_0 = ocamlformat.override { version = "0.20.0"; }; - ocamlformat_0_20_1 = ocamlformat.override { version = "0.20.1"; }; - ocamlformat_0_21_0 = ocamlformat.override { version = "0.21.0"; }; - ocamlformat_0_22_4 = ocamlformat.override { version = "0.22.4"; }; - ocamlformat_0_23_0 = ocamlformat.override { version = "0.23.0"; }; - ocamlformat_0_24_1 = ocamlformat.override { version = "0.24.1"; }; - ocamlformat_0_25_1 = ocamlformat.override { version = "0.25.1"; }; - - ocamlformat = callPackage ./generic.nix {}; -} diff --git a/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/pkgs/development/tools/ocaml/ocamlformat/generic.nix deleted file mode 100644 index d63d0d9894b01..0000000000000 --- a/pkgs/development/tools/ocaml/ocamlformat/generic.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ lib, callPackage, ocaml-ng, version ? "0.25.1" }: - -with ocaml-ng.ocamlPackages; - -let - inherit (callPackage ../../../ocaml-modules/ocamlformat/generic.nix { - inherit version; - }) - src library_deps; - -in buildDunePackage { - pname = "ocamlformat"; - inherit src version; - - minimalOCamlVersion = "4.08"; - duneVersion = "3"; - - nativeBuildInputs = - if lib.versionAtLeast version "0.25.1" then [ ] else [ menhir ]; - - buildInputs = [ re ] ++ library_deps - ++ lib.optionals (lib.versionAtLeast version "0.25.1") - [ (ocamlformat-lib.override { inherit version; }) ]; - - meta = { - homepage = "https://github.com/ocaml-ppx/ocamlformat"; - description = "Auto-formatter for OCaml code"; - maintainers = with lib.maintainers; [ Zimmi48 marsam Julow ]; - license = lib.licenses.mit; - }; -} |