nixpkgs/pkgs/applications/science/logic/verifast/default.nix

51 lines
1.5 KiB
Nix
Raw Normal View History

2019-05-22 12:03:39 +01:00
{ stdenv, fetchurl, gtk2, gdk-pixbuf, atk, pango, glib, cairo, freetype
, fontconfig, libxml2, gnome2 }:
let
2018-04-25 22:54:57 +01:00
libPath = stdenv.lib.makeLibraryPath
2019-05-22 12:03:39 +01:00
[ stdenv.cc.libc stdenv.cc.cc gtk2 gdk-pixbuf atk pango glib cairo
freetype fontconfig libxml2 gnome2.gtksourceview
2018-04-25 22:54:57 +01:00
] + ":${stdenv.cc.cc.lib}/lib64:$out/libexec";
patchExe = x: ''
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath} ${x}
'';
2018-04-25 22:54:57 +01:00
patchLib = x: ''
patchelf --set-rpath ${libPath} ${x}
'';
in
stdenv.mkDerivation rec {
pname = "verifast";
2018-04-25 22:54:57 +01:00
version = "18.02";
src = fetchurl {
url = "https://github.com/verifast/verifast/releases/download/${version}/${pname}-${version}-linux.tar.gz";
2018-04-25 22:54:57 +01:00
sha256 = "19050be23b6d5e471690421fee59f84c58b29e38379fb86b8f3713a206a4423e";
};
dontStrip = true;
phases = "unpackPhase installPhase";
installPhase = ''
mkdir -p $out/bin
cp -R bin $out/libexec
2018-04-25 22:54:57 +01:00
${patchExe "$out/libexec/verifast"}
${patchExe "$out/libexec/vfide"}
${patchLib "$out/libexec/libz3.so"}
ln -s $out/libexec/verifast $out/bin/verifast
ln -s $out/libexec/vfide $out/bin/vfide
'';
meta = {
description = "Verification for C and Java programs via separation logic";
homepage = "http://people.cs.kuleuven.be/~bart.jacobs/verifast/";
license = stdenv.lib.licenses.msrla;
platforms = [ "x86_64-linux" ];
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}