summary refs log tree commit diff
path: root/pkgs/by-name/bo/boogie/package.nix
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2023-09-16 23:29:10 +0300
committerGitHub <noreply@github.com>2023-09-16 23:29:10 +0300
commit98e1e2d61ace146ccc443637fe1b1ae60096501c (patch)
treef3b5616dc402282af959084c2c5916378f6e2c3d /pkgs/by-name/bo/boogie/package.nix
parent3b4ba08b9527c00433cb6dcf6b3f45afc922d19c (diff)
parent7006d97373cbaf64e522dd2673c6c2220ebf81a9 (diff)
downloadnixpkgs-98e1e2d61ace146ccc443637fe1b1ae60096501c.tar
nixpkgs-98e1e2d61ace146ccc443637fe1b1ae60096501c.tar.gz
nixpkgs-98e1e2d61ace146ccc443637fe1b1ae60096501c.tar.bz2
nixpkgs-98e1e2d61ace146ccc443637fe1b1ae60096501c.tar.lz
nixpkgs-98e1e2d61ace146ccc443637fe1b1ae60096501c.tar.xz
nixpkgs-98e1e2d61ace146ccc443637fe1b1ae60096501c.tar.zst
nixpkgs-98e1e2d61ace146ccc443637fe1b1ae60096501c.zip
Merge pull request #255378 from mdarocha/move-boogie
boogie: 2.15.7 -> 3.0.4, move out of `dotnet-packages.nix`
Diffstat (limited to 'pkgs/by-name/bo/boogie/package.nix')
-rw-r--r--pkgs/by-name/bo/boogie/package.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/by-name/bo/boogie/package.nix b/pkgs/by-name/bo/boogie/package.nix
new file mode 100644
index 00000000000..44811a33b63
--- /dev/null
+++ b/pkgs/by-name/bo/boogie/package.nix
@@ -0,0 +1,57 @@
+{ lib, buildDotnetModule, fetchFromGitHub, z3 }:
+
+buildDotnetModule rec {
+  pname = "Boogie";
+  version = "3.0.4";
+
+  src = fetchFromGitHub {
+    owner = "boogie-org";
+    repo = "boogie";
+    rev = "v${version}";
+    sha256 = "sha256-yebThnIOpZ5crYsSZtbDj8Gn6DznTNJ4T/TsFR3gWvs=";
+  };
+
+  projectFile = [ "Source/Boogie.sln" ];
+  nugetDeps = ./deps.nix;
+
+  executables = [ "BoogieDriver" ];
+
+  makeWrapperArgs = [
+    "--prefix PATH : ${z3}/bin"
+  ];
+
+  postInstall = ''
+      # so that this derivation can be used as a vim plugin to install syntax highlighting
+      vimdir=$out/share/vim-plugins/boogie
+      install -Dt $vimdir/syntax/ Util/vim/syntax/boogie.vim
+      mkdir $vimdir/ftdetect
+      echo 'au BufRead,BufNewFile *.bpl set filetype=boogie' > $vimdir/ftdetect/bpl.vim
+      mkdir -p $out/share/nvim
+      ln -s $out/share/vim-plugins/boogie $out/share/nvim/site
+  '';
+
+  postFixup = ''
+      ln -s "$out/bin/BoogieDriver" "$out/bin/boogie"
+      rm -f $out/bin/{Microsoft,NUnit3,System}.* "$out/bin"/*Tests
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/boogie ${./install-check-file.bpl}
+  '';
+
+  meta = with lib; {
+    description = "An intermediate verification language";
+    homepage = "https://github.com/boogie-org/boogie";
+    longDescription = ''
+      Boogie is an intermediate verification language (IVL), intended as a
+      layer on which to build program verifiers for other languages.
+
+      This derivation may be used as a vim plugin to provide syntax highlighting.
+    '';
+    license = licenses.mspl;
+    maintainers = [ maintainers.taktoa ];
+    platforms = with platforms; (linux ++ darwin);
+  };
+}
+