2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.8.1";
|
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}";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-sP6KTR50Ns4Yf/DGeSK7kB0dF0lraWbx948EOmsy+8c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cargoHash = "sha256-6tiTgyhkPeH/oWcce1U2UsVngEfc4LKbB1zMt7meshA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-01-13 08:15:51 +00:00
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2024-01-13 08:15:51 +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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "sccache";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/mozilla/sccache";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/mozilla/sccache/releases/tag/v${version}";
|
|
|
|
maintainers = with maintainers; [ doronbehar figsoda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|