summary refs log tree commit diff
path: root/pkgs/development/tools/analysis/spin/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/analysis/spin/default.nix')
-rw-r--r--pkgs/development/tools/analysis/spin/default.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/tools/analysis/spin/default.nix b/pkgs/development/tools/analysis/spin/default.nix
index 29559bf8b0ef..ab9954735f35 100644
--- a/pkgs/development/tools/analysis/spin/default.nix
+++ b/pkgs/development/tools/analysis/spin/default.nix
@@ -1,6 +1,9 @@
-{stdenv, fetchurl, yacc }:
+{ stdenv, fetchurl, makeWrapper, yacc, gcc }:
 
-stdenv.mkDerivation rec {
+let
+  binPath = stdenv.lib.makeBinPath [ gcc ];
+
+in stdenv.mkDerivation rec {
   name = "spin-${version}";
   version = "6.4.5";
   url-version = stdenv.lib.replaceChars ["."] [""] version;
@@ -13,11 +16,16 @@ stdenv.mkDerivation rec {
     sha256 = "0x8qnwm2xa8f176c52mzpvnfzglxs6xgig7bcgvrvkb3xf114224";
   };
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ yacc ];
 
   sourceRoot = "Spin/Src${version}";
 
-  installPhase = "install -D spin $out/bin/spin";
+  installPhase = ''
+    install -D spin $out/bin/spin
+    wrapProgram $out/bin/spin \
+      --prefix PATH : ${binPath}
+  '';
 
   meta = with stdenv.lib; {
     description = "Formal verification tool for distributed software systems";