nixpkgs/pkgs/development/compilers/zz/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2020-03-04 09:20:00 +00:00
{ lib, rustPlatform, fetchFromGitHub, makeWrapper, z3 }:
rustPlatform.buildRustPackage rec {
2020-05-28 10:20:00 +01:00
pname = "zz";
version = "unstable-2021-03-07";
2020-03-04 09:20:00 +00:00
# when updating, choose commit of the latest build on http://bin.zetz.it/
2020-03-04 09:20:00 +00:00
src = fetchFromGitHub {
2021-01-25 13:03:26 +00:00
owner = "zetzit";
2020-03-04 09:20:00 +00:00
repo = "zz";
rev = "d3fc968ba2ae6668f930e39077f9a90aecb9fdc4";
sha256 = "18p17lgwq6rq1n76sj0dwb32bpxflfd7knky1v0sgmaxfpaq04y3";
2020-03-04 09:20:00 +00:00
};
nativeBuildInputs = [ makeWrapper ];
cargoSha256 = "0i3c459d4699z4dwvdw1495krdv3c2qpygrsw0cz3j0zd2n5gqj6";
2020-03-04 09:20:00 +00:00
postPatch = ''
# remove search path entry which would reference /build
sed -i '/env!("CARGO_MANIFEST_DIR")/d' src/lib.rs
'';
2020-03-04 09:20:00 +00:00
postInstall = ''
mkdir -p "$out/share/zz"
cp -r modules "$out/share/zz/"
wrapProgram $out/bin/zz \
--prefix PATH ":" "${lib.getBin z3}/bin" \
--suffix ZZ_MODULE_PATHS ":" "$out/share/zz/modules"
2020-03-04 09:20:00 +00:00
'';
meta = with lib; {
2021-03-07 18:45:50 +00:00
description = "ZetZ a zymbolic verifier and tranzpiler to bare metal C";
2021-01-25 13:03:26 +00:00
homepage = "https://github.com/zetzit/zz";
2020-03-04 09:20:00 +00:00
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}