diff options
Diffstat (limited to 'pkgs/applications/science/logic/isabelle/components/mkBuild.nix')
-rw-r--r-- | pkgs/applications/science/logic/isabelle/components/mkBuild.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/applications/science/logic/isabelle/components/mkBuild.nix b/pkgs/applications/science/logic/isabelle/components/mkBuild.nix new file mode 100644 index 0000000000000..a05b5196b0076 --- /dev/null +++ b/pkgs/applications/science/logic/isabelle/components/mkBuild.nix @@ -0,0 +1,36 @@ +{ isabelle, path }: + +let + dir = "$out/isabelle/${isabelle.dirname}"; + iDir = "${isabelle}/${isabelle.dirname}"; +in '' + shopt -s extglob + mkdir -p ${dir}/lib/classes + + cDir=$out/${isabelle.dirname}/contrib/${path} + mkdir -p $cDir + cp -r !(isabelle) $cDir + + cd ${dir} + ln -s ${iDir}/!(lib|bin) ./ + ln -s ${iDir}/lib/!(classes) lib/ + ln -s ${iDir}/lib/classes/* lib/classes/ + + mkdir bin/ + cp ${iDir}/bin/* bin/ + + export HOME=$TMP + bin/isabelle components -u $cDir + bin/isabelle scala_build + + cd lib/classes + for f in ${iDir}/lib/classes/*; do + rm $(basename $f) + done + + lDir=$out/${isabelle.dirname}/lib/classes/ + mkdir -p $lDir + cp -r * $lDir + cd $out + rm -rf isabelle +'' |