2016-03-26 09:44:09 +01:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, yacc, gcc
|
|
|
|
, withISpin ? true, tk, swarm, graphviz }:
|
2009-05-03 16:35:43 +02:00
|
|
|
|
2016-03-12 12:12:44 +01:00
|
|
|
let
|
|
|
|
binPath = stdenv.lib.makeBinPath [ gcc ];
|
2016-03-26 09:44:09 +01:00
|
|
|
ibinPath = stdenv.lib.makeBinPath [ gcc tk swarm graphviz tk ];
|
2016-03-12 12:12:44 +01:00
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2014-07-14 19:56:57 +02:00
|
|
|
name = "spin-${version}";
|
2016-02-27 12:09:44 +01:00
|
|
|
version = "6.4.5";
|
2014-10-06 11:18:49 +02:00
|
|
|
url-version = stdenv.lib.replaceChars ["."] [""] version;
|
2009-05-03 16:35:43 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-02-27 12:09:44 +01:00
|
|
|
# The homepage is behind CloudFlare anti-DDoS protection, which blocks cURL.
|
|
|
|
# Dropbox mirror from developers:
|
|
|
|
# https://www.dropbox.com/sh/fgzipzp4wpo3qc1/AADZPqS4aoR-pjNF6OQXRLQHa
|
|
|
|
url = "https://www.dropbox.com/sh/fgzipzp4wpo3qc1/AAANRpxsSyWC7iHZB-XgBwJFa/spin645.tar.gz?raw=1";
|
|
|
|
sha256 = "0x8qnwm2xa8f176c52mzpvnfzglxs6xgig7bcgvrvkb3xf114224";
|
2009-05-03 16:35:43 +02:00
|
|
|
};
|
|
|
|
|
2016-03-12 12:12:44 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2014-07-14 19:56:57 +02:00
|
|
|
buildInputs = [ yacc ];
|
2009-05-03 16:35:43 +02:00
|
|
|
|
2014-07-14 19:56:57 +02:00
|
|
|
sourceRoot = "Spin/Src${version}";
|
|
|
|
|
2016-03-12 12:12:44 +01:00
|
|
|
installPhase = ''
|
2016-03-26 09:44:09 +01:00
|
|
|
install -Dm755 spin $out/bin/spin
|
2016-03-12 12:12:44 +01:00
|
|
|
wrapProgram $out/bin/spin \
|
|
|
|
--prefix PATH : ${binPath}
|
2016-03-26 09:44:09 +01:00
|
|
|
'' + lib.optionalString withISpin ''
|
|
|
|
install -Dm755 ../iSpin/ispin.tcl $out/bin/ispin
|
|
|
|
wrapProgram $out/bin/ispin \
|
|
|
|
--prefix PATH ':' "$out/bin:${ibinPath}"
|
2016-03-12 12:12:44 +01:00
|
|
|
'';
|
2009-05-03 16:35:43 +02:00
|
|
|
|
2014-10-06 11:18:49 +02:00
|
|
|
meta = with stdenv.lib; {
|
2009-05-03 16:35:43 +02:00
|
|
|
description = "Formal verification tool for distributed software systems";
|
|
|
|
homepage = http://spinroot.com/;
|
2016-02-27 12:09:44 +01:00
|
|
|
license = licenses.free;
|
|
|
|
platforms = platforms.linux;
|
2014-10-06 11:18:49 +02:00
|
|
|
maintainers = with maintainers; [ mornfall pSub ];
|
2009-05-03 16:35:43 +02:00
|
|
|
};
|
|
|
|
}
|