uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
45
pkgs/build-support/ocaml/dune.nix
Normal file
45
pkgs/build-support/ocaml/dune.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, ocaml, findlib, dune_1, dune_2, dune_3 }:
|
||||
|
||||
{ pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args:
|
||||
|
||||
let Dune =
|
||||
let dune-version = args . duneVersion or (if args.useDune2 or true then "2" else "1"); in
|
||||
{ "1" = dune_1; "2" = dune_2; "3" = dune_3; }."${dune-version}"
|
||||
; in
|
||||
|
||||
if (args ? minimumOCamlVersion && lib.versionOlder ocaml.version args.minimumOCamlVersion) ||
|
||||
(args ? minimalOCamlVersion && lib.versionOlder ocaml.version args.minimalOCamlVersion)
|
||||
then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
|
||||
else
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
|
||||
inherit enableParallelBuilding;
|
||||
dontAddStaticConfigureFlags = true;
|
||||
configurePlatforms = [];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
dune build -p ${pname} ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
|
||||
runHook postBuild
|
||||
'';
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
dune runtest -p ${pname} ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
|
||||
runHook postCheck
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
dune install --prefix $out --libdir $OCAMLFIND_DESTDIR ${pname}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
} // (builtins.removeAttrs args [ "minimalOCamlVersion" "duneVersion" ]) // {
|
||||
|
||||
name = "ocaml${ocaml.version}-${pname}-${version}";
|
||||
|
||||
nativeBuildInputs = [ ocaml Dune findlib ] ++ nativeBuildInputs;
|
||||
|
||||
meta = (args.meta or {}) // { platforms = args.meta.platforms or ocaml.meta.platforms; };
|
||||
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue