depot/third_party/nixpkgs/pkgs/development/tools/misc/sccache/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

32 lines
1 KiB
Nix

{ stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security }:
rustPlatform.buildRustPackage rec {
version = "0.3.1";
pname = "sccache";
src = fetchFromGitHub {
owner = "mozilla";
repo = "sccache";
rev = "v${version}";
sha256 = "sha256-SjGtFkFyHJRnFg3QwXksrV+T08oku80vcivLzFWt94g=";
};
cargoSha256 = "sha256-cd/4otvrneOqntBzNZP1/RY0jg/NYeugiblr1tatITI=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
# sccache-dist is only supported on x86_64 Linux machines.
buildFeatures = lib.optionals (stdenv.system == "x86_64-linux") [ "dist-client" "dist-server" ];
# 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 = with lib; {
description = "Ccache with Cloud Storage";
homepage = "https://github.com/mozilla/sccache";
maintainers = with maintainers; [ doronbehar ];
license = licenses.asl20;
};
}