2018-04-07 16:39:54 +01:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, yacc, gcc
|
2016-03-26 08:44:09 +00:00
|
|
|
, withISpin ? true, tk, swarm, graphviz }:
|
2009-05-03 15:35:43 +01:00
|
|
|
|
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 {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "spin";
|
2019-01-18 16:16:48 +00:00
|
|
|
version = "6.4.9";
|
2014-10-06 10:18:49 +01:00
|
|
|
url-version = stdenv.lib.replaceChars ["."] [""] version;
|
2009-05-03 15:35:43 +01:00
|
|
|
|
2018-04-07 16:39:54 +01:00
|
|
|
src = fetchurl {
|
2019-01-20 03:35:05 +00:00
|
|
|
# The homepage is behind CloudFlare anti-DDoS protection, which blocks cURL.
|
|
|
|
# Dropbox mirror from developers:
|
|
|
|
# https://www.dropbox.com/sh/fgzipzp4wpo3qc1/AADZPqS4aoR-pjNF6OQXRLQHa
|
|
|
|
# (note that this URL doesn't work aross versions and hash should come from official site)
|
|
|
|
url = "https://www.dropbox.com/sh/fgzipzp4wpo3qc1/AABtxFePMJmPxsxSvU5cpxh8a/spin${url-version}.tar.gz?raw=1";
|
2019-01-18 16:16:48 +00:00
|
|
|
sha256 = "07b7wk3qyfnp4pgwicqd33l7i1krzyihx0cf9zkv81ywaklf5vll";
|
2009-05-03 15:35:43 +01:00
|
|
|
};
|
|
|
|
|
2016-03-12 11:12:44 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2014-07-14 18:56:57 +01:00
|
|
|
buildInputs = [ yacc ];
|
2009-05-03 15:35:43 +01:00
|
|
|
|
2014-07-14 18:56:57 +01:00
|
|
|
sourceRoot = "Spin/Src${version}";
|
|
|
|
|
2016-03-12 11:12:44 +00:00
|
|
|
installPhase = ''
|
2019-01-18 16:23:44 +00:00
|
|
|
install -Dm644 ../Man/spin.1 $out/share/man/man1/spin.1
|
|
|
|
|
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
|
|
|
'';
|
2009-05-03 15:35:43 +01:00
|
|
|
|
2014-10-06 10:18:49 +01:00
|
|
|
meta = with stdenv.lib; {
|
2009-05-03 15:35:43 +01:00
|
|
|
description = "Formal verification tool for distributed software systems";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://spinroot.com/";
|
2016-02-27 11:09:44 +00:00
|
|
|
license = licenses.free;
|
|
|
|
platforms = platforms.linux;
|
2018-01-17 05:13:23 +00:00
|
|
|
maintainers = with maintainers; [ pSub ];
|
2009-05-03 15:35:43 +01:00
|
|
|
};
|
|
|
|
}
|