2022-02-10 20:34:41 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper, bison, gcc, tk, swarm, graphviz }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2022-02-10 20:34:41 +00:00
|
|
|
binPath = lib.makeBinPath [ gcc graphviz tk swarm ];
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "spin";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "6.5.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nimble-code";
|
|
|
|
repo = "Spin";
|
|
|
|
rev = "version-${version}";
|
|
|
|
sha256 = "sha256-drvQXfDZCZRycBZt/VNngy8zs4XVJg+d1b4dQXVcyFU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [ bison ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/Src";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
makeFlags = [ "DESTDIR=$(out)" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/spin --prefix PATH : ${binPath}
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/spin
|
|
|
|
cp $src/optional_gui/ispin.tcl $out/share/spin
|
|
|
|
makeWrapper $out/share/spin/ispin.tcl $out/bin/ispin \
|
|
|
|
--prefix PATH : $out/bin:${binPath}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Formal verification tool for distributed software systems";
|
2021-04-19 03:05:28 +00:00
|
|
|
homepage = "https://spinroot.com/";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ pSub siraben ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|