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

41 lines
1.2 KiB
Nix
Raw Normal View History

2016-03-26 09:44:09 +01:00
{ stdenv, lib, fetchurl, makeWrapper, yacc, gcc
, withISpin ? true, tk, swarm, graphviz }:
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 {
name = "spin-${version}";
2017-09-12 09:51:05 +02:00
version = "6.4.7";
url-version = stdenv.lib.replaceChars ["."] [""] version;
src = fetchurl {
2017-09-12 09:51:05 +02:00
url = "http://spinroot.com/spin/Src/spin${url-version}.tar.gz";
sha256 = "17m2xaag0jns8hsa4466zxq35ylg9fnzynzvjjmx4ympbiil6mqv";
};
2016-03-12 12:12:44 +01:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ yacc ];
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
'';
meta = with stdenv.lib; {
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;
maintainers = with maintainers; [ mornfall pSub ];
};
}