binary-cache/pkgs/tvix/default.nix

51 lines
975 B
Nix
Raw Normal View History

2024-06-29 15:53:57 +00:00
{
fetchgit,
fetchpatch,
2024-06-29 15:53:57 +00:00
rustPlatform,
protobuf,
packages ? [ ],
pname ? "tvix",
}:
rustPlatform.buildRustPackage rec {
inherit pname;
version = "0.1.0";
2024-10-05 14:29:41 +00:00
src = builtins.fetchGit {
name = "tvix";
url = "https://code.tvl.fyi/depot.git";
2024-10-06 13:52:08 +00:00
rev = "96a78877eb0d3109bd5b76345b9f1aa87bb3ec20";
};
2024-06-29 15:53:57 +00:00
patches = [
(fetchpatch {
2024-10-05 14:29:41 +00:00
url = "https://cl.tvl.fyi/changes/depot~12016/revisions/1/patch?download";
decode = "base64 -d";
2024-10-05 14:29:41 +00:00
hash = "sha256-ldIZkkbtYYAPHK62eYnYVudrZCdBqTIg3V27IutFPAA=";
})
];
postPatch = "cd tvix";
2024-07-19 08:49:02 +00:00
2024-10-05 14:29:41 +00:00
preBuild = ''
export PROTO_ROOT=$(realpath $PWD/..)
'';
2024-06-29 15:53:57 +00:00
doCheck = false;
cargoBuildFlags = builtins.concatStringsSep " " (
builtins.map (v: "-p ${v}") packages
++ [
"--features"
"tvix-store/xp-store-composition"
]
);
2024-06-29 15:53:57 +00:00
nativeBuildInputs = [ protobuf ];
cargoLock = {
lockFile = src + "/tvix/Cargo.lock";
allowBuiltinFetchGit = true;
2024-06-29 15:53:57 +00:00
};
meta = { };
}