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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, rustPlatform, fetchFromGitHub, makeWrapper, z3, pkgsHostTarget }:
let
runtimeDeps = [
z3
pkgsHostTarget.targetPackages.stdenv.cc
];
in
2020-03-04 10:20:00 +01:00
rustPlatform.buildRustPackage rec {
2020-05-28 11:20:00 +02:00
pname = "zz";
version = "unstable-2021-05-04";
2020-03-04 10:20:00 +01:00
# when updating, choose commit of the latest build on http://bin.zetz.it/
2020-03-04 10:20:00 +01:00
src = fetchFromGitHub {
2021-01-25 14:03:26 +01:00
owner = "zetzit";
2020-03-04 10:20:00 +01:00
repo = "zz";
rev = "18020b10b933cfe2fc7f2256b71e646889f9b1d2";
sha256 = "01nlyyk1qxk76dq2hw3wpbjwkh27zzp6mpczjnxdpv6rxs7mc825";
2020-03-04 10:20:00 +01:00
};
nativeBuildInputs = [ makeWrapper ];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"rsmt2-0.11.0" = "sha256-RwNsS0zge8uOXmgzTvDwp8AD70NspIZq0LgW/v3yrpA=";
};
};
2020-03-04 10:20:00 +01:00
postPatch = ''
# remove search path entry which would reference /build
sed -i '/env!("CARGO_MANIFEST_DIR")/d' src/lib.rs
'';
2020-03-04 10:20:00 +01:00
postInstall = ''
mkdir -p "$out/share/zz"
cp -r modules "$out/share/zz/"
wrapProgram $out/bin/zz \
--prefix PATH ":" "${lib.makeBinPath runtimeDeps}" \
--suffix ZZ_MODULE_PATHS ":" "$out/share/zz/modules"
2020-03-04 10:20:00 +01:00
'';
meta = with lib; {
2021-03-07 19:45:50 +01:00
description = "ZetZ a zymbolic verifier and tranzpiler to bare metal C";
mainProgram = "zz";
2021-01-25 14:03:26 +01:00
homepage = "https://github.com/zetzit/zz";
2020-03-04 10:20:00 +01:00
license = licenses.mit;
2024-04-24 06:20:00 +02:00
maintainers = [ ];
2020-03-04 10:20:00 +01:00
};
}