2021-02-13 14:23:35 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2021-02-13 14:23:35 +00:00
|
|
|
version = "0.2.15";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "sccache";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozilla";
|
|
|
|
repo = "sccache";
|
2021-02-13 14:23:35 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1kygk7ilv7la36kv4jdn1ird7f3896wgr88kyqf0iagfqkzb2vsb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
cargoSha256 = "1cfdwf00jgwsv0f72427asid1xr57s56jk5xj489dgppvgy7wdbj";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
cargoBuildFlags = [ "--features=dist-client,dist-server" ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Tests fail because of client server setup which is not possible inside the pure environment,
|
|
|
|
# see https://github.com/mozilla/sccache/issues/460
|
2021-02-13 14:23:35 +00:00
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Ccache with Cloud Storage";
|
|
|
|
homepage = "https://github.com/mozilla/sccache";
|
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
|
|
license = licenses.asl20;
|
2021-03-09 03:18:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|