nixpkgs/pkgs/development/tools/analysis/spin/default.nix

52 lines
1.5 KiB
Nix
Raw Normal View History

2018-03-09 16:19:51 +00:00
{ stdenv, lib, requireFile, makeWrapper, yacc, gcc
2016-03-26 08:44:09 +00:00
, withISpin ? true, tk, swarm, graphviz }:
2016-03-12 11:12:44 +00:00
let
binPath = stdenv.lib.makeBinPath [ gcc ];
2016-03-26 08:44:09 +00:00
ibinPath = stdenv.lib.makeBinPath [ gcc tk swarm graphviz tk ];
2016-03-12 11:12:44 +00:00
in stdenv.mkDerivation rec {
name = "spin-${version}";
2018-03-09 16:19:51 +00:00
version = "6.4.8";
url-version = stdenv.lib.replaceChars ["."] [""] version;
2018-03-09 16:19:51 +00:00
src = requireFile {
name = "spin${url-version}.tar.gz";
sha256 = "1rpazi5fj772121cn7r85fxypmaiv0x6x2l82b5y1xqzyf0fi4ph";
message = ''
reCAPTCHA is preventing us to download the file for you.
Please download it at http://spinroot.com/spin/Src/index.html
and add it to the nix-store using nix-prefetch-url.
'';
};
2016-03-12 11:12:44 +00:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ yacc ];
sourceRoot = "Spin/Src${version}";
2018-03-09 16:19:51 +00:00
unpackPhase = ''
# The archive is compressed twice
gunzip -c $src > spin.tar.gz
tar -xzf spin.tar.gz
'';
2016-03-12 11:12:44 +00:00
installPhase = ''
2016-03-26 08:44:09 +00:00
install -Dm755 spin $out/bin/spin
2016-03-12 11:12:44 +00:00
wrapProgram $out/bin/spin \
--prefix PATH : ${binPath}
2016-03-26 08:44:09 +00:00
'' + lib.optionalString withISpin ''
install -Dm755 ../iSpin/ispin.tcl $out/bin/ispin
wrapProgram $out/bin/ispin \
--prefix PATH ':' "$out/bin:${ibinPath}"
2016-03-12 11:12:44 +00:00
'';
meta = with stdenv.lib; {
description = "Formal verification tool for distributed software systems";
homepage = http://spinroot.com/;
2016-02-27 11:09:44 +00:00
license = licenses.free;
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
};
}