2024-06-29 15:53:57 +00:00
|
|
|
{
|
2024-07-21 23:13:03 +00:00
|
|
|
fetchgit,
|
2024-07-24 08:14:15 +00:00
|
|
|
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 {
|
2024-07-21 23:13:03 +00:00
|
|
|
name = "tvix";
|
2024-07-24 08:14:15 +00:00
|
|
|
url = "https://code.tvl.fyi/depot.git";
|
2024-10-06 13:52:08 +00:00
|
|
|
rev = "96a78877eb0d3109bd5b76345b9f1aa87bb3ec20";
|
2024-07-21 23:13:03 +00:00
|
|
|
};
|
2024-06-29 15:53:57 +00:00
|
|
|
|
2024-07-24 08:14:15 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2024-10-05 14:29:41 +00:00
|
|
|
url = "https://cl.tvl.fyi/changes/depot~12016/revisions/1/patch?download";
|
2024-07-24 08:14:15 +00:00
|
|
|
decode = "base64 -d";
|
2024-10-05 14:29:41 +00:00
|
|
|
hash = "sha256-ldIZkkbtYYAPHK62eYnYVudrZCdBqTIg3V27IutFPAA=";
|
2024-07-24 08:14:15 +00:00
|
|
|
})
|
|
|
|
];
|
2024-07-20 18:13:00 +00:00
|
|
|
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;
|
|
|
|
|
2024-07-21 23:13:03 +00:00
|
|
|
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 = {
|
2024-07-21 23:13:03 +00:00
|
|
|
lockFile = src + "/tvix/Cargo.lock";
|
|
|
|
allowBuiltinFetchGit = true;
|
2024-06-29 15:53:57 +00:00
|
|
|
};
|
|
|
|
meta = { };
|
|
|
|
}
|