forked from yu-re-ka/binary-cache
51 lines
975 B
Nix
51 lines
975 B
Nix
{
|
|
fetchgit,
|
|
fetchpatch,
|
|
rustPlatform,
|
|
protobuf,
|
|
packages ? [ ],
|
|
pname ? "tvix",
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
inherit pname;
|
|
version = "0.1.0";
|
|
|
|
src = builtins.fetchGit {
|
|
name = "tvix";
|
|
url = "https://code.tvl.fyi/depot.git";
|
|
rev = "e97202e54a02d0717f0457fec0863e3e74fc93d8";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
url = "https://cl.tvl.fyi/changes/depot~12016/revisions/1/patch?download";
|
|
decode = "base64 -d";
|
|
hash = "sha256-ldIZkkbtYYAPHK62eYnYVudrZCdBqTIg3V27IutFPAA=";
|
|
})
|
|
];
|
|
postPatch = "cd tvix";
|
|
|
|
preBuild = ''
|
|
export PROTO_ROOT=$(realpath $PWD/..)
|
|
'';
|
|
|
|
doCheck = false;
|
|
|
|
cargoBuildFlags = builtins.concatStringsSep " " (
|
|
builtins.map (v: "-p ${v}") packages
|
|
++ [
|
|
"--features"
|
|
"tvix-store/xp-store-composition"
|
|
]
|
|
);
|
|
|
|
nativeBuildInputs = [ protobuf ];
|
|
|
|
cargoLock = {
|
|
lockFile = src + "/tvix/Cargo.lock";
|
|
allowBuiltinFetchGit = true;
|
|
};
|
|
meta = { };
|
|
}
|