50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
pkg-config,
|
|
openssl,
|
|
distributed ? false,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
version = "0.12.0";
|
|
pname = "sccache";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mozilla";
|
|
repo = "sccache";
|
|
rev = "v${finalAttrs.version}";
|
|
sha256 = "sha256-QNLcA31SJf7XmxYvzDC5LCKVu5ZWiw7U249KjUAGIZw=";
|
|
};
|
|
|
|
cargoHash = "sha256-tJGGS6Zpsz9nye2VKdZRuFeeqJ71MsXn3C9ytqeEW5I=";
|
|
|
|
buildFeatures = lib.optionals distributed [
|
|
"dist-client"
|
|
"dist-server"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
buildInputs = [
|
|
openssl
|
|
];
|
|
|
|
# Tests fail because of client server setup which is not possible inside the
|
|
# pure environment, see https://github.com/mozilla/sccache/issues/460
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
description = "Ccache with Cloud Storage";
|
|
mainProgram = "sccache";
|
|
homepage = "https://github.com/mozilla/sccache";
|
|
changelog = "https://github.com/mozilla/sccache/releases/tag/v${finalAttrs.version}";
|
|
maintainers = with lib.maintainers; [
|
|
doronbehar
|
|
];
|
|
license = lib.licenses.asl20;
|
|
};
|
|
})
|