blob: a05b5196b0076792dc577de06c9c9232441fc833 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
''
|