nixpkgs/pkgs/development/ocaml-modules
sterni 2140791f9b
ocamlPackages.janeStreet{,_0_9_0}: join the ocamlPackages fix point, allowing overriding to work as expected (#113696)
* ocamlPackages.janeStreet_0_9_0: join the ocamlPackages fix point

Internal dependencies in the janeStreet sets were always taken from the
own rec attribute set. While this is pretty simple and convenient, it
has the disadvantage that it doesn't play nice with overriding: If you'd
override an attribute in a janeStreet set previously, it would be
changed when referenced directly, but the other packages in that
janeStreet set still would use the original, non-overridden version of
the derivation.

This is easily fixed by passing janeStreet_0_9_0 itself from the fix
point of ocamlPackages and using it to reference the dependencies.

Example showing it now works as expected:

test-overlay.nix:

    self: super: {
      ocamlPackages = super.ocamlPackages.overrideScope (old: _: {
        janeStreet_0_9_0 = old.janeStreet_0_9_0 // {
          base = old.janeStreet_0_9_0.base.overrideAttrs (_: {
            meta.broken = true;
          });
        };
      });
    }

nix-repl> (import ./. {
  overlays = [ (import ./test-overlay.nix) ];
}).ocamlPackages.janeStreet_0_9_0.stdio

error: Package ‘ocaml4.10.0-base-0.9.4’ in /home/lukas/src/nix/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage.nix:6 is marked as broken, refusing to evaluate.

a) To temporarily allow broken packages, you can use an environment variable
   for a single invocation of the nix tools.

     $ export NIXPKGS_ALLOW_BROKEN=1

b) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

* ocamlPackages.janeStreet: take part in fixpoint for OCaml >= 4.08

This change makes overrides to the janeStreet set work as expected by
making the janeStreet set take part in the ocamlPackages fixpoint for
janeStreet 0.14, i. e. OCaml >= 4.08

* ocamlPackages.janeStreet: take part in fixpoint for OCaml == 4.07

This change makes overrides to the janeStreet set work as expected by
making the janeStreet set take part in the ocamlPackages fixpoint for
janeStreet 0.12, i. e. OCaml == 4.07

* ocamlPackages.janeStreet: take part in fixpoint for OCaml < 4.07

This change makes overrides to the janeStreet set work as expected by
making the janeStreet set take part in the ocamlPackages fixpoint for
janeStreet 0.11, i. e. OCaml < 4.07

* ocamlPackages.janeStreet: remove self - super distinction

Previously, we inherited non-janestreet ocaml dependencies from super
and janestreet dependencies from self which always was super.janeStreet.

This behavior is however not really what we want due to liftJaneStreet:
Users and other packages will use ocamlPackages.base etc. instead of
ocamlPackages.janeStreet.base and the like. Consequently they also would
override the top-level attributes which would mean that other janestreet
packages would not pick up on it however.

As a consequence however, overriding ocamlPackages.janeStreet.base
doesn't work. Since this was never possible, I don't think this is an
issue. It is probably a good idea to deprecate that set anyways and
printing a warning when it is used via trace.

janeStreet_0_9_0 is unchanged as the disticniton between self and super
makes sense for it.

Below is an example showing how overriding would work from an user's
perspective:

test-overlay.nix:

    self: super: {
      ocamlPackages = super.ocamlPackages.overrideScope (old: _: {
        base = old.base.overrideAttrs (_: {
          meta.broken = true;
        });
      });
    }

nix-repl> (import ./. { overlays = [ (import ./test-overlay.nix) ]; }).ocamlPackages.
stdio
error: Package ‘ocaml4.10.0-base-0.14.0’ in /home/lukas/src/nix/nixpkgs/pkgs/development/ocaml-modules/janestreet/janePackage_0_14.nix:12 is marked as broken, refusing to evaluate.

a) To temporarily allow broken packages, you can use an environment variable
   for a single invocation of the nix tools.

     $ export NIXPKGS_ALLOW_BROKEN=1

b) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.
2021-04-11 12:26:10 +02:00
..
afl-persistent
alcotest
angstrom
angstrom-async
angstrom-lwt-unix
angstrom-unix
ansiterminal
apron
arp
asn1-combinators ocamlPackages.asn1-combinators: 0.2.4 -> 0.2.5 2021-03-07 20:30:39 +01:00
astring
atd ocamlPackages.atd: 2.0.0 → 2.2.1 2021-02-25 08:04:35 +01:00
atdgen ocamlPackages.atd: 2.0.0 → 2.2.1 2021-02-25 08:04:35 +01:00
awa
bap ocamlPackages.bap: 2.1.0 → 2.2.0 2021-02-26 07:09:22 +01:00
base64 ocamlPackages.base64: 3.4.0 -> 3.5.0 2021-02-16 20:08:23 +01:00
batteries ocamlPackages.batteries: 3.2.0 → 3.3.0 2021-03-09 08:27:37 +01:00
benchmark
bheap
bigarray-compat ocamlPackages.bigarray-compat: use Dune 2 2021-03-04 09:20:14 +01:00
bigarray-overlap
bigstring ocamlPackages.bigstring: 0.2 → 0.3 2021-04-01 08:33:08 +02:00
bigstringaf
bin_prot
biniou ocamlPackages.biniou: use Dune 2 2021-03-04 22:00:10 +01:00
biocaml
bisect_ppx
bistro
bitstring ocamlPackages.bitstring: 4.0.1 → 4.1.0 2021-03-19 11:47:03 +01:00
bitv
bolt
bos
ca-certs ocamlPackages.ca-certs: 0.1.3. -> 0.2.0 2021-03-08 08:55:33 +01:00
cairo2
calendar
camlimages
camlpdf
camlzip
camomile ocamlPackages.camomile: use Dune 2 2021-02-27 21:19:06 +01:00
caqti
carton ocamlPackages.git: 3.3.0 -> 3.3.2; decompress: 1.2.0 -> 1.3.0; duff: 0.3 -> 0.4; and related updates (#116486) 2021-03-16 13:07:17 +01:00
cfstream
charInfo_width
checkseum
cil
cmdliner
cohttp ocamlPackages.cohttp*: 2.5.4 -> 2.5.5 2021-03-16 15:36:11 +01:00
comparelib
conduit
config-file
containers
cow
cpdf
cpu ocamlPackages.cpu: use Dune 2 2021-04-01 08:49:17 +02:00
cpuid ocamlPackages.cpuid: use Dune 2 2021-03-28 22:29:40 +02:00
crowbar ocamlPackages.crowbar: use Dune 2 2021-04-01 09:37:32 +02:00
cryptgps
cryptokit
csexp ocamlPackages.csexp: 1.3.2 -> 1.4.0 2021-03-12 05:20:52 +00:00
cstruct
csv
ctypes ocamlPackages.ctypes: 0.17.1 -> 0.18.0 2021-03-10 16:12:03 +01:00
curly
curses
decompress ocamlPackages.decompress-1-2: remove at 1.2.0 2021-04-02 15:03:44 +02:00
diet ocamlPackages.diet: use Dune 2 2021-02-13 11:05:22 +01:00
digestif ocamlPackages.digestif: 0.9.0 → 1.0.0 2021-03-03 08:14:59 +01:00
directories ocamlPackages.directories: init at 0.2 2021-03-03 08:41:55 +01:00
dispatch
dns
dolmen
dolog
domain-name
dtoa ocamlPackages.dtoa: use Dune 2 2021-04-01 09:08:13 +02:00
duff ocamlPackages.git: 3.3.0 -> 3.3.2; decompress: 1.2.0 -> 1.3.0; duff: 0.3 -> 0.4; and related updates (#116486) 2021-03-16 13:07:17 +01:00
dum
dune-action-plugin
dune-build-info
dune-configurator
dune-glob
dune-private-libs
duration
dypgen
earley
earlybird
easy-format
eigen
either
elina
eliom ocamlPackages.js_of_ocaml: 3.8.0 -> 3.9.1 2021-03-26 08:43:14 +01:00
elpi elpi: 1.12.0 -> 1.13.0 2021-02-18 22:26:10 +01:00
emile
encore ocamlPackages.encore: 0.7 -> 0.8 2021-03-18 05:43:38 +01:00
enumerate
eqaf
erm_xml
erm_xmpp
estring
ethernet
expat
extlib ocamlPackages.ocaml_extlib: 1.7.7 -> 1.7.8 2021-03-23 08:36:25 +01:00
ezjsonm
ezxmlm
facile
faillib
faraday faraday-{lwt,lwt-unix,async}: add Faraday runtimes 2021-03-22 18:54:04 +01:00
farfadet
fdkaac
fiat-p256
fieldslib
fileutils
fix
fmt
fontconfig
fpath
frontc
functoria
functory
gapi-ocaml
gen
genspio
gg
git ocamlPackages.git: 3.3.2 -> 3.3.3 2021-03-25 20:04:23 +01:00
gmap
gmetadom
gnuplot ocamlPackages.gnuplot: use Dune 2 2021-04-05 15:14:40 +02:00
graphics
graphql
graphql_ppx
gsl ocamlPackages.gsl: use Dune 2 2021-04-02 14:12:12 +02:00
gtktop
hacl_x25519
herelib
hex
hidapi ocamlPackages.hidapi: use Dune 2 2021-04-01 08:33:08 +02:00
higlo
hkdf
hmap
http
httpaf
hxd ocamlPackages.git: 3.3.0 -> 3.3.2; decompress: 1.2.0 -> 1.3.0; duff: 0.3 -> 0.4; and related updates (#116486) 2021-03-16 13:07:17 +01:00
imagelib ocamlPackages.imagelib: 20200929 -> 20210402 2021-04-02 15:03:44 +02:00
index ocamlPackages: irmin 2.2.0 → 2.4.0; git: 2.13 → 3.2.0; and related changes (#110184) 2021-02-16 08:39:46 +01:00
inifiles
inotify
integers ocamlPackages.integers: use Dune 2 2021-03-03 10:10:20 +01:00
io-page
ipaddr
iri
irmin ocamlPackages.irmin*: 2.5.1 -> 2.5.2 2021-04-09 07:57:04 +02:00
irmin-watcher ocamlPackages.irmin-watcher: use Dune 2 2021-02-12 17:42:29 +01:00
iso8601
iter
janestreet ocamlPackages.janeStreet{,_0_9_0}: join the ocamlPackages fix point, allowing overriding to work as expected (#113696) 2021-04-11 12:26:10 +02:00
javalib
jingoo
jsonm
jwto
kafka
ke
lablgl
lablgtk
lablgtk-extras
lablgtk3
labltk ocamlPackages.labltk: add version 8.06.10 for OCaml 4.12 2021-03-18 13:22:47 +01:00
lacaml
lambda-term
lambdasoup
lens
linenoise ocamlPackages.linenoise: use Dune 2 2021-02-24 21:02:25 +01:00
llvm
logs
lru ocamlPackages.lru: use Dune 2 2021-03-18 05:56:36 +01:00
lua-ml
luv ocamlPackages.luv: init at 0.5.7 2021-03-16 12:38:03 +01:00
lwt ocamlPackages.lwt: 5.3.0 → 5.4.0 2021-02-12 17:42:29 +01:00
lwt-dllist ocamlPackages.lwt: 5.3.0 → 5.4.0 2021-02-12 17:42:29 +01:00
lwt_log ocamlPackages.lwt: 5.3.0 → 5.4.0 2021-02-12 17:42:29 +01:00
lwt_react
lwt_ssl
macaddr
macaque
magic-mime
magick
mariadb treewide: remove stdenv where not needed 2021-03-04 19:54:50 +07:00
markup
mdx mdx: 1.8.0 -> 1.8.1 2021-02-12 09:13:01 -08:00
menhir
merlin-extend ocamlPackages.merlin-extend: use Dune 2 2021-04-07 20:34:26 +02:00
metrics
mew
mew_vi
mimic ocamlPackages.mimic: 0.0.1 -> 0.0.2 2021-04-05 14:27:57 +02:00
minisat ocamlPackages.minisat: 0.2 → 0.3 2021-04-06 08:43:38 +02:00
mirage
mirage-block
mirage-block-ramdisk
mirage-block-unix
mirage-bootvar-unix
mirage-channel
mirage-clock ocamlPackages.mirage-clock-freestanding: init at 3.1.0 2021-04-01 16:10:15 +02:00
mirage-console
mirage-crypto ocamlPackages.mirage-crypto*: 0.9.1 -> 0.9.2 2021-04-09 14:23:12 +02:00
mirage-device ocamlPackages.mirage-device: use Dune 2 2021-02-12 17:42:29 +01:00
mirage-flow
mirage-fs
mirage-kv
mirage-logs
mirage-nat
mirage-net
mirage-profile
mirage-protocols
mirage-random
mirage-random-test
mirage-stack
mirage-time
mirage-unix
mirage-vnetif
mlgmp
mlgmpidl
mmap ocamlPackages.mmap: use Dune 2 2021-02-27 17:59:54 +01:00
mparser
mtime
mustache
mysql
nocrypto
nonstd
notty
npy ocamlPackages.npy: unstable-2019-04-02 → 0.0.9 2021-03-22 10:01:13 +01:00
num
ocaml-cairo treewide: unzip buildInputs to nativeBuildInputs (#112302) 2021-02-20 16:01:53 -05:00
ocaml-freestanding ocaml-freestanding: propagate solo5 2021-03-30 08:57:29 +02:00
ocaml-gettext ocamlPackages.gettext-camomile: init at 0.4.2 2021-04-02 09:13:44 +02:00
ocaml-libvirt
ocaml-lsp ocamlPackages.ocaml-lsp: wrap with dot-merlin-reader 2021-03-21 22:09:52 +01:00
ocaml-migrate-parsetree ocamlPackages.ocaml-migrate-parsetree-2-1: use Dune 2 2021-02-28 11:28:04 +01:00
ocaml-monadic
ocaml-protoc
ocaml-r
ocaml-result ocamlPackages.result: use Dune 2 2021-02-27 13:31:01 +01:00
ocaml-sat-solvers
ocaml-syntax-shims
ocaml-text
ocaml-version ocamlPackages.ocaml-version: use Dune 2 2021-03-28 17:47:05 +02:00
ocamlfuse
ocamlgraph
ocamlmake
ocamlnat
ocamlnet ocamlPackages.ocamlnet: 4.1.8 → 4.1.9 2021-04-07 20:32:28 +02:00
ocamlsdl
ocb-stubblr
ocf
ocp-ocamlres
ocplib-endian
ocplib-json-typed
ocplib-simplex
ocsigen-deriving
ocsigen-server treewide: makeWrapper buildInputs to nativeBuildInputs 2021-02-19 20:09:16 +07:00
ocsigen-start
ocsigen-toolkit
octavius
ocurl
odate
odn
odoc
omd
opam-core ocamlPackages.opam-core: use Dune 2 2021-02-13 10:33:09 +01:00
opam-file-format
opam-format
opam-repository
opam-state
opium
opium_kernel
optcomp
opti ocamlPackages.opti: use Dune 2 2021-04-05 17:19:44 +02:00
optint ocamlPackages.optint: use dune 2 2021-03-08 09:08:23 +01:00
otfm
otr
ounit
ounit2 ocamlPackages.ounit2: use Dune 2 2021-02-16 18:04:54 +01:00
owee
owl
owl-base ocamlPackages.owl{,-base}: 1.0.0 -> 1.0.1 2021-03-16 10:30:55 +01:00
pa_bench
pa_ounit
parany ocamlPackages.parany: use Dune 2 2021-04-01 08:46:19 +02:00
parmap ocamlPackages.parmap: use Dune 2 2021-04-05 16:50:15 +02:00
parse-argv ocamlPackages.parse-argv: use Dune 2 2021-02-13 11:20:19 +01:00
pbkdf ocamlPackages.pbkdf: init at 1.1.0 2021-04-05 15:09:05 +02:00
pcap-format
pcre
pecu
pgocaml ocamlPackages.ppxlib: default to 0.22.0 2021-03-25 17:36:51 +01:00
pgsolver
phylogenetics
pipebang
piqi
piqi-ocaml
posix
postgresql
pprint
ppx_bap ocamlPackages.ppx_bap: init at 0.14 2021-02-26 07:09:22 +01:00
ppx_blob
ppx_cstubs ocamlPackages.ppx_cstubs : Init at 0.6.1.1 2021-03-11 08:28:04 +01:00
ppx_derivers ocamlPackages.ppx_derivers: use Dune 2 2021-03-01 10:07:44 +01:00
ppx_deriving ocamlPackages.ppx_deriving : Add 5.2.1 2021-03-11 08:28:04 +01:00
ppx_deriving_protobuf
ppx_deriving_rpc
ppx_deriving_yojson
ppx_gen_rec
ppx_import ocamlPackages.ppx_import: 1.7.1 → 1.8.0 2021-03-19 08:17:03 +01:00
ppx_tools
ppx_tools_versioned
ppx_yojson_conv_lib ocamlPackages.ppx_yojson_conv_lib: use Dune 2 2021-02-25 08:20:25 +01:00
ppxfind
ppxlib ocamlPackages.ppxlib: default to 0.22.0 2021-03-25 17:36:51 +01:00
printbox ocamlPackages.printbox: 0.4 → 0.5 2021-04-11 10:10:38 +02:00
process
prof_spacetime
progress
psmt2-frontend ocamlPackages.psmt2-frontend: 0.2 → 0.3.1 2021-02-23 22:11:44 +01:00
psq ocamlPackages.psq: use Dune 2 2021-03-19 17:26:04 +01:00
ptime
ptmap
ptset
pycaml
qcheck ocamlPackages.qcheck*: 0.16 -> 0.17 2021-02-21 17:16:17 +01:00
qtest ocamlPackages.qtest: 2.11.1 -> 2.11.2 2021-02-17 11:29:55 +00:00
randomconv
re ocamlPackages.re: use Dune 2 2021-02-14 14:15:55 +01:00
react
reactivedata
repr
resource-pooling ocamlPackages.resource-pooling: use Dune 2 2021-02-12 17:42:29 +01:00
rope ocamlPackages.rope: use Dune 2 2021-03-07 12:07:14 +01:00
rpclib
rresult
safepass
sawja
secp256k1
sedlex
semaphore-compat
seq
sha ocamlPackages.sha: init at 1.13 2021-02-17 17:45:18 +01:00
sodium ocamlPackages.ctypes: 0.17.1 -> 0.18.0 2021-03-10 16:12:03 +01:00
sosa ocamlPackages.sosa: remove spurious dependency on nonstd 2021-04-02 09:01:22 +02:00
spacetime_lib ocamlPackages.spacetime_lib: use Dune 2 2021-03-30 08:32:05 +02:00
spelll ocamlPackages.spelll: use Dune 2 2021-03-29 22:05:45 +02:00
sqlite3 ocamlPackages.sqlite3: use Dune 2 2021-04-07 21:27:13 +02:00
sqlite3EZ
srt
ssl
stdint ocamlPackages.qcheck*: 0.16 -> 0.17 2021-02-21 17:16:17 +01:00
stdlib-shims ocamlPackages.stdlib-shims: 0.1.0 → 0.3.0 2021-02-26 11:40:38 +01:00
stringext
syslog
syslog-message
tcpip ocamlPackages.tcpip: 6.0.0 -> 6.1.0 2021-03-30 08:57:29 +02:00
tcslib
terminal_size
tls
toml
topkg
torch ocamlPackages.torch: 0.11 → 0.12 2021-03-15 15:16:12 +01:00
trie
tsdl
tsort
tuntap
twt
type_conv
typerep
tyxml ocamlPackages.tyxml: use Dune 2 2021-02-13 10:16:35 +01:00
uchar
ulex
uri
uucd
uucp ocamlPackages.uucp: use throw instead of lib.assertMsg 2021-02-17 18:23:17 +01:00
uuidm
uunf
uuseg
uutf
variantslib
vchan
vg
visitors ocamlPackages.ppxlib: default to 0.22.0 2021-03-25 17:36:51 +01:00
wasm
webbrowser
webmachine
wodan ocamlPackages: irmin 2.2.0 → 2.4.0; git: 2.13 → 3.2.0; and related changes (#110184) 2021-02-16 08:39:46 +01:00
wtf8 ocamlPackages.wtf8: use Dune 2 2021-03-28 22:05:32 +02:00
x509
xenstore
xenstore-tool
xenstore_transport
xml-light
xmlm
xtmpl
yaml
yojson ocamlPackages.yojson: use Dune 2 2021-02-25 11:02:25 +01:00
z3
zarith ocamlPackages.zarith: 1.11 → 1.12 2021-03-12 08:51:50 +01:00
zed
zmq ocamlPackages.zmq: use Dune 2 2021-02-12 17:42:29 +01:00