pkgsStatic.ocaml-ng: migrate static adapter to derivations themselves
This commit is contained in:
parent
41e07ee477
commit
a17fc03375
|
@ -12,6 +12,8 @@ else
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
|
|
||||||
inherit enableParallelBuilding;
|
inherit enableParallelBuilding;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
|
@ -42,6 +42,8 @@ EOF
|
||||||
# The custom `configure` script does not expect the --prefix
|
# The custom `configure` script does not expect the --prefix
|
||||||
# option. Installation is handled by ocamlfind.
|
# option. Installation is handled by ocamlfind.
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
createFindlibDestdir = true;
|
createFindlibDestdir = true;
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
|
||||||
installTargets = "install-hacl-star-raw";
|
installTargets = "install-hacl-star-raw";
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
which
|
which
|
||||||
|
|
|
@ -17,6 +17,8 @@ buildOcaml (args // {
|
||||||
buildInputs = [ ocaml_oasis js_build_tools opaline ] ++ buildInputs;
|
buildInputs = [ ocaml_oasis js_build_tools opaline ] ++ buildInputs;
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
configurePhase = "./configure --prefix $out";
|
configurePhase = "./configure --prefix $out";
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ buildOcaml rec {
|
||||||
buildInputs = [ ocaml_oasis opaline ];
|
buildInputs = [ ocaml_oasis opaline ];
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
configurePhase = "./configure --prefix $prefix";
|
configurePhase = "./configure --prefix $prefix";
|
||||||
installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${name}.install";
|
installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${name}.install";
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureScript = "./configure.sh";
|
configureScript = "./configure.sh";
|
||||||
dontAddPrefix = "true";
|
dontAddPrefix = "true";
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
propagatedBuildInputs = [ camlzip extlib ];
|
propagatedBuildInputs = [ camlzip extlib ];
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = [ "--use-findlib" "--installbindir" "$(out)/bin" ];
|
configureFlags = [ "--use-findlib" "--installbindir" "$(out)/bin" ];
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
buildFlags = [ "all" "opt" ];
|
buildFlags = [ "all" "opt" ];
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
|
||||||
createFindlibDestdir = true;
|
createFindlibDestdir = true;
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
configureFlagsArray=(
|
configureFlagsArray=(
|
||||||
|
|
|
@ -40,6 +40,8 @@ buildDunePackage rec {
|
||||||
configureFlags = [ "--root $(out)" "--prefix /" ];
|
configureFlags = [ "--root $(out)" "--prefix /" ];
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
make -C src confs
|
make -C src confs
|
||||||
|
|
|
@ -31,6 +31,8 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
configureScript = "./configure.sh";
|
configureScript = "./configure.sh";
|
||||||
dontAddPrefix = "true";
|
dontAddPrefix = "true";
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
propagatedBuildInputs = [ javalib ];
|
propagatedBuildInputs = [ javalib ];
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
configureFlags = [ "-installdir ${placeholder "out"}/lib/ocaml/${ocaml.version}/site-lib" ];
|
configureFlags = [ "-installdir ${placeholder "out"}/lib/ocaml/${ocaml.version}/site-lib" ];
|
||||||
|
|
||||||
preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs";
|
preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs";
|
||||||
|
|
|
@ -24,6 +24,8 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://dune.build/";
|
homepage = "https://dune.build/";
|
||||||
|
|
|
@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
|
||||||
buildFlags = "release";
|
buildFlags = "release";
|
||||||
|
|
||||||
dontAddPrefix = true;
|
dontAddPrefix = true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
|
installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
|
||||||
patches = [ ./ldconf.patch ./install_topfind.patch ];
|
patches = [ ./ldconf.patch ./install_topfind.patch ];
|
||||||
|
|
||||||
dontAddPrefix=true;
|
dontAddPrefix=true;
|
||||||
|
dontAddStaticConfigureFlags = true;
|
||||||
|
configurePlatforms = [];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"-bindir" "${placeholder "out"}/bin"
|
"-bindir" "${placeholder "out"}/bin"
|
||||||
|
|
|
@ -47,21 +47,6 @@ self: super: let
|
||||||
# ++ optional (super.stdenv.hostPlatform.libc == "glibc") ((flip overrideInStdenv) [ self.stdenv.glibc.static ])
|
# ++ optional (super.stdenv.hostPlatform.libc == "glibc") ((flip overrideInStdenv) [ self.stdenv.glibc.static ])
|
||||||
;
|
;
|
||||||
|
|
||||||
ocamlFixPackage = b:
|
|
||||||
b.overrideAttrs (o: {
|
|
||||||
configurePlatforms = [ ];
|
|
||||||
dontAddStaticConfigureFlags = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
ocamlStaticAdapter = _: super:
|
|
||||||
self.lib.mapAttrs
|
|
||||||
(_: p: if p ? overrideAttrs then ocamlFixPackage p else p)
|
|
||||||
super
|
|
||||||
// {
|
|
||||||
lablgtk = null; # Currently xlibs cause infinite recursion
|
|
||||||
ocaml = super.ocaml;
|
|
||||||
};
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
stdenv = foldl (flip id) super.stdenv staticAdapters;
|
stdenv = foldl (flip id) super.stdenv staticAdapters;
|
||||||
|
|
||||||
|
@ -78,11 +63,6 @@ in {
|
||||||
gssSupport = false;
|
gssSupport = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
ocaml-ng = self.lib.mapAttrs (_: set:
|
|
||||||
if set ? overrideScope' then set.overrideScope' ocamlStaticAdapter else set
|
|
||||||
) super.ocaml-ng;
|
|
||||||
|
|
||||||
|
|
||||||
zlib = super.zlib.override {
|
zlib = super.zlib.override {
|
||||||
# Don’t use new stdenv zlib because
|
# Don’t use new stdenv zlib because
|
||||||
# it doesn’t like the --disable-shared flag
|
# it doesn’t like the --disable-shared flag
|
||||||
|
|
Loading…
Reference in a new issue