mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
why3: deprecate phases
This commit is contained in:
parent
7b5d67fa60
commit
c849ada0c5
@ -1,12 +1,12 @@
|
||||
{ callPackage, fetchurl, fetchpatch, lib, stdenv
|
||||
, ocamlPackages, coqPackages, rubber, hevea, emacs }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "why3";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://gforge.inria.fr/frs/download.php/file/38425/why3-1.4.0.tar.gz";
|
||||
url = "https://gforge.inria.fr/frs/download.php/file/38425/why3-${version}.tar.gz";
|
||||
sha256 = "0lw0cpx347zz9vvwqibmbxgs80fsd16scgk3isscvwxnajpc3rv8";
|
||||
};
|
||||
|
||||
|
@ -1,31 +1,30 @@
|
||||
{ stdenv, makeWrapper, runCommand, symlinkJoin, why3 }:
|
||||
provers:
|
||||
let configAwkScript = runCommand "why3-conf.awk" { inherit provers; }
|
||||
''
|
||||
for p in $provers; do
|
||||
for b in $p/bin/*; do
|
||||
BASENAME=$(basename $b)
|
||||
echo "/^command =/{ gsub(\"$BASENAME\", \"$b\") }" >> $out
|
||||
done
|
||||
''
|
||||
for p in $provers; do
|
||||
for b in $p/bin/*; do
|
||||
BASENAME=$(basename $b)
|
||||
echo "/^command =/{ gsub(\"$BASENAME\", \"$b\") }" >> $out
|
||||
done
|
||||
echo '{ print }' >> $out
|
||||
'';
|
||||
in stdenv.mkDerivation {
|
||||
done
|
||||
echo '{ print }' >> $out
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "${why3.name}-with-provers";
|
||||
|
||||
phases = [ "buildPhase" "installPhase" ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ why3 ] ++ provers;
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $out/share/why3/
|
||||
why3 config --detect-provers -C $out/share/why3/why3.conf
|
||||
awk -i inplace -f ${configAwkScript} $out/share/why3/why3.conf
|
||||
mkdir -p $out/share/why3/
|
||||
why3 config --detect-provers -C $out/share/why3/why3.conf
|
||||
awk -i inplace -f ${configAwkScript} $out/share/why3/why3.conf
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${why3}/bin/why3 $out/bin/why3 --add-flags "--extra-config $out/share/why3/why3.conf"
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${why3}/bin/why3 $out/bin/why3 --add-flags "--extra-config $out/share/why3/why3.conf"
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user