nixpkgs/pkgs/development/tools/analysis/spin/default.nix
Lluís Batlle i Rossell 166f375bd2 Fixing spin's references to cpp
svn path=/nixpkgs/trunk/; revision=15478
2009-05-06 21:03:49 +00:00

31 lines
723 B
Nix

{stdenv, fetchurl, flex, yacc, tk }:
stdenv.mkDerivation {
name = "spin-5.1.7";
src = fetchurl {
url = http://spinroot.com/spin/Src/spin517.tar.gz;
sha256 = "03c6bmar4z13jx7dddb029f0qnmgl8x4hyfwn3qijjyd4dbliiw6";
};
buildInputs = [ flex yacc tk ];
patchPhase = ''
cd Src*
sed -i -e 's/-DNXT/-DNXT -DCPP="\\"gcc -E -x c\\""/' makefile
'';
installPhase = ''
ensureDir $out/bin
cp ../Xspin*/xsp* $out/bin/xspin
sed -i -e '1s@^#!/bin/sh@#!${tk}/bin/wish@' \
-e '/exec wish/d' $out/bin/xspin
cp spin $out/bin
'';
meta = {
description = "Formal verification tool for distributed software systems";
homepage = http://spinroot.com/;
license = "free";
};
}