Merge pull request #24830 from mayflower/refactor/boolToString
treewide: use boolToString function
This commit is contained in:
@@ -27,7 +27,7 @@ in stdenv.mkDerivation rec {
|
||||
echo "<settings><mirrors>\
|
||||
<mirror><id>tmpm2</id><url>file://$out/m2</url><mirrorOf>*</mirrorOf></mirror></mirrors>\
|
||||
<localRepository>$out/m2/</localRepository></settings>" >> $out/m2/settings.xml
|
||||
${maven}/bin/mvn ${optionalString (quiet) "-q"} clean package -Dmaven.test.skip=${if skipTests then "true" else "false"} -Danimal.sniffer.skip=true -gs $out/m2/settings.xml
|
||||
${maven}/bin/mvn ${optionalString (quiet) "-q"} clean package -Dmaven.test.skip=${boolToString skipTests} -Danimal.sniffer.skip=true -gs $out/m2/settings.xml
|
||||
cp ./target/*.jar $out/m2/${m2Path}
|
||||
cp -v ./target/*.jar $out/target/
|
||||
'';
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, js_of_ocaml
|
||||
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, opam, js_of_ocaml
|
||||
, jsooSupport ? !(stdenv.lib.versionAtLeast ocaml.version "4.04")
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ocaml${ocaml.version}-mtime-0.8.3";
|
||||
|
||||
@@ -15,7 +17,7 @@ stdenv.mkDerivation {
|
||||
buildInputs = [ ocaml findlib ocamlbuild opam ]
|
||||
++ stdenv.lib.optional jsooSupport js_of_ocaml;
|
||||
|
||||
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true jsoo=${if jsooSupport then "true" else "false"}";
|
||||
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true jsoo=${boolToString jsooSupport}";
|
||||
|
||||
installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
|
||||
|
||||
@@ -23,7 +25,7 @@ stdenv.mkDerivation {
|
||||
description = "Monotonic wall-clock time for OCaml";
|
||||
homepage = http://erratique.ch/software/mtime;
|
||||
inherit (ocaml.meta) platforms;
|
||||
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = [ maintainers.vbgl ];
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildPhase = ''
|
||||
LD_LIBRARY_PATH=${cpuid}/lib/ocaml/${ocaml.version}/site-lib/stubslibs/ \
|
||||
${topkg.buildPhase} --with-lwt ${if withLwt then "true" else "false"}
|
||||
${topkg.buildPhase} --with-lwt ${boolToString withLwt}
|
||||
'';
|
||||
inherit (topkg) installPhase;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ buildOcaml rec {
|
||||
optional withLwt lwt;
|
||||
|
||||
buildPhase = topkg.buildPhase
|
||||
+ " --with-lwt ${if withLwt then "true" else "false"}";
|
||||
+ " --with-lwt ${boolToString withLwt}";
|
||||
|
||||
inherit (topkg) installPhase;
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg
|
||||
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg
|
||||
, uchar, result, gg, uutf, otfm, js_of_ocaml,
|
||||
pdfBackend ? true, # depends on uutf and otfm
|
||||
htmlcBackend ? true # depends on js_of_ocaml
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optionals versionAtLeast;
|
||||
|
||||
pname = "vg";
|
||||
version = "0.9.0";
|
||||
webpage = "http://erratique.ch/software/${pname}";
|
||||
sob = b: if b then "true" else "false";
|
||||
in
|
||||
|
||||
assert versionAtLeast ocaml.version "4.02.0";
|
||||
@@ -35,13 +36,14 @@ stdenv.mkDerivation rec {
|
||||
unpackCmd = "tar xjf $src";
|
||||
|
||||
buildPhase = topkg.buildPhase
|
||||
+ " --with-uutf ${sob pdfBackend} --with-otfm ${sob pdfBackend}"
|
||||
+ " --with-js_of_ocaml ${sob htmlcBackend}"
|
||||
+ " --with-cairo2 false";
|
||||
+ " --with-uutf ${boolToString pdfBackend}"
|
||||
+ " --with-otfm ${boolToString pdfBackend}"
|
||||
+ " --with-js_of_ocaml ${boolToString htmlcBackend}"
|
||||
+ " --with-cairo2 false";
|
||||
|
||||
inherit (topkg) installPhase;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = {
|
||||
description = "Declarative 2D vector graphics for OCaml";
|
||||
longDescription = ''
|
||||
Vg is an OCaml module for declarative 2D vector graphics. In Vg, images
|
||||
|
||||
Reference in New Issue
Block a user