Skip to content

Comments

ocamlPackages.findlib: don't wait configurePhase to set OCAMLFIND_DESTDIR#152276

Merged
symphorien merged 2 commits intoNixOS:stagingfrom
symphorien:ocaml-destdir-nix-shell
Jan 23, 2022
Merged

ocamlPackages.findlib: don't wait configurePhase to set OCAMLFIND_DESTDIR#152276
symphorien merged 2 commits intoNixOS:stagingfrom
symphorien:ocaml-destdir-nix-shell

Conversation

@symphorien
Copy link
Member

this fixes ocamlfind printconf destdir inside nix-shell

fixes #152028

the regression was introduced by a3ab43d which was meant to fix building ocamlPackages.ocamlbuild with strictDeps. This commit keeps ocamlbuild building.

Motivation for this change
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

…TDIR

this fixes ocamlfind printconf destdir inside nix-shell

fixes NixOS#152028

the regression was introduced by
a3ab43d which was meant to fix building
ocamlPackages.ocamlbuild with strictDeps. This commit keeps ocamlbuild
building.
@github-actions github-actions bot added the 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. label Dec 26, 2021
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Dec 26, 2021
allows to use configurePhase in nix-shell
@symphorien symphorien merged commit 8c34758 into NixOS:staging Jan 23, 2022
@trofi
Copy link
Contributor

trofi commented Jan 26, 2022

Bisect says this change broke ocamlPackages.ocaml_libvirt in staging:

$ nix build -f. ocamlPackages.ocaml_libvirt -L
...
ocaml-libvirt> ocamlfind install  -ldconf ignore libvirt \
ocaml-libvirt>   ../META *.so *.a *.cma *.cmx *.cmxa *.cmi *.mli
ocaml-libvirt> ocamlfind: Bad configuration: Cannot mkdir /nix/store/iw3q68k4il2zqch2z17ifxygqcs5sjgd-ocaml-libvirt-0.6.1.5/lib/ocaml/4.12.0/site-lib/libvirt because a path component does not exist or is not a directory
ocaml-libvirt> make[1]: *** [Makefile:134: install-opt] Error 2
ocaml-libvirt> make[1]: Leaving directory '/build/source/libvirt'
ocaml-libvirt> make: *** [Makefile:31: install-opt] Error 1

@trofi
Copy link
Contributor

trofi commented Jan 26, 2022

Probably because ocamlPackages.ocaml_libvirt overrides pre/post hooks with phase overrides:

  buildPhase = "make all opt CPPFLAGS=-Wno-error";
  installPhase = "make install-opt";

@trofi
Copy link
Contributor

trofi commented Jan 26, 2022

Proposed fix as #156825

vbgl added a commit to vbgl/nixpkgs that referenced this pull request Feb 25, 2022
This package has been unmaintained upstream for years and broken in
nixpkgs by 9a77836 in NixOS#152276.
vbgl added a commit that referenced this pull request Feb 26, 2022
This package has been unmaintained upstream for years and broken in
nixpkgs by 9a77836 in #152276.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants