rocqPackages.mkRocqDerivation: change prefix for coq
Make the default prefix be set to `[ "coq" ]` if `useCoq` is `true`. This ensures that `mkRocqDerivation` can be called directly to build Coq derivations without changing the derivation name / `opam-name`.
This commit is contained in:
@@ -55,7 +55,7 @@ in
|
||||
extraNativeBuildInputs ? [ ],
|
||||
overrideBuildInputs ? [ ],
|
||||
overrideNativeBuildInputs ? [ ],
|
||||
namePrefix ? [ "rocq-core" ],
|
||||
namePrefix ? null,
|
||||
enableParallelBuilding ? true,
|
||||
extraInstallFlags ? [ ],
|
||||
setROCQBIN ? true,
|
||||
@@ -66,7 +66,7 @@ in
|
||||
dropDerivationAttrs ? [ ],
|
||||
useDuneifVersion ? (x: false),
|
||||
useDune ? false,
|
||||
opam-name ? (concatStringsSep "-" (namePrefix ++ [ pname ])),
|
||||
opam-name ? null,
|
||||
useCoq ? false,
|
||||
useCoqifVersion ? (x: false),
|
||||
...
|
||||
@@ -160,10 +160,12 @@ let
|
||||
] ""
|
||||
)
|
||||
+ optionalString (v == null) "-broken";
|
||||
append-version = p: n: p + display-pkg n "" rocqPackages.${n}.version + "-";
|
||||
prefix-name = foldl append-version "" namePrefix;
|
||||
useDune = args.useDune or (useDuneifVersion fetched.version);
|
||||
useCoq = args.useCoq or (useCoqifVersion fetched.version);
|
||||
namePrefix = args.namePrefix or [ (if useCoq then "coq" else "rocq-core") ];
|
||||
append-version = p: n: p + display-pkg n "" rocqPackages.${n}.version + "-";
|
||||
prefix-name = foldl append-version "" namePrefix;
|
||||
opam-name = args.opam-name or (concatStringsSep "-" (namePrefix ++ [ pname ]));
|
||||
rocq-core = if useCoq then coq // { rocq-version = coq.coq-version; } else args0.rocq-core;
|
||||
rocqlib-flags = [
|
||||
"COQLIBINSTALL=$(out)/lib/coq/${rocq-core.rocq-version}/user-contrib"
|
||||
|
||||
Reference in New Issue
Block a user