nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 pkg-config,
6 openssl,
7 distributed ? false,
8}:
9
10rustPlatform.buildRustPackage (finalAttrs: {
11 version = "0.13.0";
12 pname = "sccache";
13
14 src = fetchFromGitHub {
15 owner = "mozilla";
16 repo = "sccache";
17 rev = "v${finalAttrs.version}";
18 sha256 = "sha256-3NdqnK1/vs2Z3SnLDzJBP69E+okqVZaI6dZHEylgcPU=";
19 };
20
21 cargoHash = "sha256-aC1FXjE6aj1YUIyXoTIjFHJfTtK40ZaXOl4uV/IgqMs=";
22
23 buildFeatures = lib.optionals distributed [
24 "dist-client"
25 "dist-server"
26 ];
27
28 nativeBuildInputs = [
29 pkg-config
30 ];
31 buildInputs = [
32 openssl
33 ];
34
35 # Tests fail because of client server setup which is not possible inside the
36 # pure environment, see https://github.com/mozilla/sccache/issues/460
37 doCheck = false;
38
39 meta = {
40 description = "Ccache with Cloud Storage";
41 mainProgram = "sccache";
42 homepage = "https://github.com/mozilla/sccache";
43 changelog = "https://github.com/mozilla/sccache/releases/tag/v${finalAttrs.version}";
44 maintainers = with lib.maintainers; [
45 doronbehar
46 ];
47 license = lib.licenses.asl20;
48 };
49})