Commit Graph

67 Commits

Author SHA1 Message Date
Vincent Laporte
16611dafa6 ocaml: fix cross-compile by adding bootstrapping ocaml (#542468) 2026-07-24 08:34:00 +00:00
·𐑑𐑴𐑕𐑑𐑩𐑤
def7d4d5df ocaml: fix cross-compile by adding bootstrapping ocaml
Fixes cross compilation looking for ocamlc:

checking if the installed OCaml compiler can build the cross compiler... ./configure: line 4348: ocamlc: command not found
no (5.4.1 vs )
configure: error: exiting

Assisted-by: DeepSeek V4 Flash
2026-07-16 12:08:22 +07:00
Marek Kubica
5bae6f2287 ocaml: Update license
OCaml has switched away from QPL to LGPL2.1 around 10 years ago:
7fc2d214c4
at the 4.04 release.

Nixpkgs does not have such old versions so might as well set the version
for all of them to `lgpl21`.
2026-07-02 15:16:41 +02:00
Michael Daniels
464b9d0b9d ocaml: fix formatting 2026-02-11 19:53:29 -05:00
Vladimír Čunát
6ec6fb0a7c ocaml: fixup build on darwin
https://hydra.nixos.org/build/321382407/nixlog/1/tail
I presume that this is about gcc vs. clang toolchain,
but I haven't tested.
2026-02-11 20:52:10 +01:00
K900
3c4102eef4 Merge remote-tracking branch 'origin/staging-next' into staging 2026-02-06 15:58:23 +03:00
quantenzitrone
55280fa564 various: rename references from libX11 to libx11
this shouldn't create any rebuilds
2026-02-06 00:24:34 +01:00
George Shammas
b6368258c3 ocaml: Enable tests for the ocaml compilers 2026-01-21 07:05:40 -05:00
George Shammas
cc3c8d8160 ocaml: Add georgyo to maintainers 2026-01-21 06:54:33 -05:00
Vincent Laporte
5fe9913616 ocaml: fix build with gcc15 for version 5.0 2025-12-31 10:53:43 +01:00
Vladimír Čunát
d8a7cfb2de ocaml: avoid rebuilding the default version
Defining an env-var as an empty string would cause a rebuild.
2025-12-29 09:37:13 +01:00
definfo
4422c78d20 ocaml: fix build with gcc15 for version < 4.14
Fixes: https://hydra.nixos.org/build/316546402/nixlog/1

(and several packages relying on ocaml < 4.14 beside coq_8_15)
2025-12-29 14:37:16 +08:00
Ihar Hrachyshka
567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
Luna Nova
e7fbed853b treewide: remove usages of obsolete pie hardening flag 2025-10-09 10:13:03 -07:00
Pierre Villemot
bb0ca5271d Add noNakedPointer option to the ocaml package (#404668) 2025-05-07 08:40:24 +02:00
Weijia Wang
8855e5cbdd ocaml: use bytecode compiler on loongarch64-linux 2025-04-26 19:52:34 +02:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Antonio Nuno Monteiro
5020a1c82a ocaml: don't add bin-utils for darwin 2024-11-27 23:40:26 -08:00
Ulrik Strid
36bd945fc6 Add binutils to ocaml so that static compiler can build correctly (#359231) 2024-11-27 07:48:55 +01:00
Owen Lynch
52b7f0d233 added binutils to ocaml so that static compiler can build correctly 2024-11-26 09:55:09 +00:00
Reno Dakota
4becb3821e ocaml: build defaultentry not bootstrap on 5.2+
Building ocaml fails occasionally on aarch64-darwin. Using the
defaultentry target to build on ocaml 5.2 and greater may rectify this.
2024-11-06 14:48:04 +01:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Martin Weinelt
19680e9902 Merge pull request #217568 from trofi/stdenv-parallel-install
stdenv/generic/setup.sh: enable parallel installs for parallel builds
2023-03-15 17:10:19 +00:00
Ali Caglayan
8f16a97848 ocaml: add framePointer option
Signed-off-by: Ali Caglayan <alizter@gmail.com>

<!-- ps-id: 10ea20a5-edc5-4358-a6d7-f2b5ec319258 -->
2023-03-13 15:42:21 +01:00
Sergei Trofimovich
7b8d86277d ocaml: disable parallel installs
Without the change parallel install fails as:

    $ install flags: -j16 ...
    ...
    install: target '...-ocaml-4.14.0/lib/ocaml/threads': No such file or directory
    make[1]: *** [Makefile:140: installopt] Error 1
2023-03-02 22:00:52 +00:00
zainab-ali
c3bf65df67 ocaml: remove spaceTimeSupport after 4.12
Spacetime support was removed in OCaml version 4.12.
See the OCaml release notes: https://ocaml.org/releases/4.12.0.
See the pull request to OCaml: ocaml/ocaml#9948.
2023-02-19 16:42:53 +00:00
Sandro
5b3571c0df Merge pull request #197367 from Et7f3/use-integrated-as-darwin 2023-01-21 18:49:59 +01:00
Weijia Wang
64a4e05f0d ocaml: add unsafe string support 2023-01-19 13:55:44 +08:00
Weijia Wang
67548d607d ocaml-ng.ocamlPackages_4_0[2-5].ocaml: unbreak on aarch64-linux 2023-01-16 20:58:27 +01:00
Weijia Wang
bbc00643c7 ocaml-ng.ocamlPackages_4_09.ocaml: mark as broken on aarch64-darwin 2022-11-02 17:21:28 +01:00
Et7f3
f8b18c100b ocamlPackages.ocaml: Migrate to integrated assembler for Darwin
This is linked to https://github.com/ocaml/ocaml/pull/10176
A similar issue appeared with clang in cctools (Darwin):
```
as: this system assembler is deprecated. Please migrate to the clang integrated assembler (`as -q').
```
https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes#Deprecations
2022-10-23 14:44:18 +02:00
Vincent Laporte
7e591f949e ocaml-ng.ocamlPackages_5_0.ocaml: init at 5.0.0-β1 2022-10-22 12:09:49 +02:00
Anders Kaseorg
6920d8ca42 treewide: Simplify negated uses of versionAtLeast, versionOlder
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-04-25 13:35:24 -07:00
Felix Buehler
103f0186e1 ocaml: rename name to pname 2022-03-01 14:55:45 +01:00
Vladimír Čunát
4757815068 Merge #150128: ocaml: enable parallel building
...into staging
2022-02-28 08:11:16 +01:00
Sergei Trofimovich
238d634e4b ocaml: enable parallel building
Enable parallel building for ocaml-4.08 and above. tested as:

    $ nix build -f. ocaml-ng.ocamlPackages_{4_{00_1,01_0,02,03,04,05,06,07,08,09,10,11,12,13},latest}.ocaml --keep-going

ocaml build system supports parallel building, but but for multiple
top-level targets at the same time as it usually spawns subprocess
$(MAKE) that occasionally conflict with one another. To work it around
we use tiny Makefile with a single rule that calls top-level targets
sequentially as makefile calls:

    nixpkgs_world_bootstrap_world_opt:
       $(MAKE) world
       $(MAKE) bootstrap
       $(MAKE) world.opt

On a 16-core machine ocaml-4.12 build speeds up from 6m55s to 1m35s.

Releases 4_00_1, 4_01_0, 4_04 and 4_05 still have some race in them.
Thus this change enables parallel builds only for ocaml-4.06 and above.

Adapted from #142723

upstreams's CI tests the parallel makefile: https://github.com/ocaml/ocaml/issues/10235#issuecomment-782100584
The limit was chosen to be 4.08 because it was released in 2019, not too
long before the above link.
2022-02-27 12:00:00 +00:00
Maximilian Bosch
bcf8aeff3c ocaml 4.10/4.11: fix build w/glibc-2.34
Failing Hydra build: https://hydra.nixos.org/build/155189331
Applied a smaller patch from Fedora's fork[1] as it also applies on
older versions.

That said, these versions seem unmaintained anyways, so we should
probably drop them entirely.

[1] https://pagure.io/fedora-ocaml/c/dfb5e954a04f59b0456cc4c0ddf3acaf22e0ff07?branch=fedora-35-4.12.0
2022-02-27 10:25:39 +01:00
Maximilian Bosch
917b7e5fd2 ocaml: fix build w/glibc-2.34
ChangeLog: https://hydra.nixos.org/build/154122673
2022-02-27 10:25:39 +01:00
Robert Scott
dc523cbb80 ocaml: heed hardeningDisable flags set for individual versions
specifically this re-fixes ocaml 4.09 on clang by allowing its
hardeningDisable flags to take effect
2021-11-25 21:13:12 +00:00
Vikram Narayanan
528716bb8e ocaml: Fix aarch64-darwin build 2021-11-22 12:19:55 -08:00
Vincent Laporte
87843991ef ocaml: fix assembler on darwin 2021-11-11 11:30:19 +01:00
Guillaume Girol
6506d2ae4d pkgsStatic.ocaml: migrate some logic from static adapter to ocaml 2021-08-19 09:30:48 +02:00
Guillaume Girol
a2c566265e ocaml: add strictDeps = true 2021-08-19 09:30:46 +02:00
Guillaume Girol
061f70f8f7 ocaml: fix static compilation on recent versions 2021-08-19 09:29:55 +02:00
superherointj
805d252c3b ocaml: update meta.description 2021-06-03 11:16:27 -03:00
Ivan Babrou
2e1a7b94f3 ocamlPackages.ocaml: fix assembler detection for aarch64-darwin 2021-02-27 10:43:14 +01:00
Ben Siraphob
acc5f7b18a pkgs/development/compilers: stdenv.lib -> lib 2021-01-23 08:57:37 +07:00
Vincent Laporte
e40f4acb27 ocaml: minor refactoring 2020-11-25 07:55:44 +01:00
Symphorien Gibol
bddabe58fe ocaml: add spacetime support 2020-08-13 11:07:15 +02:00
Michael Reilly
84cf00f980 treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00