about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/sccache/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/sccache/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/misc/sccache/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/sccache/default.nix b/nixpkgs/pkgs/development/tools/misc/sccache/default.nix
new file mode 100644
index 000000000000..998abe112a6f
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/misc/sccache/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, cargo, rustc, rustPlatform, pkgconfig, glib, openssl, darwin }:
+
+rustPlatform.buildRustPackage rec {
+  version = "0.2.11";
+  pname = "sccache";
+
+  src = fetchFromGitHub {
+    owner = "mozilla";
+    repo = "sccache";
+    rev = version;
+    sha256 = "0084ddvzjgdpkwqc38kvzaz8n6av9ml3qqlkjma70hsis8w8gqjz";
+  };
+  cargoSha256 = "1bkglgrasyjyzjj9mwm32d3g3mg5yv74jj3zl7jf20dlq3rg3fh6";
+
+  cargoBuildFlags = [ "--features=all" ];
+  nativeBuildInputs = [
+    pkgconfig cargo rustc
+  ];
+  buildInputs = [
+    openssl
+  ] ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
+  # Tests fail because of client server setup which is not possible inside the pure environment,
+  # see https://github.com/mozilla/sccache/issues/460
+  checkPhase = null;
+
+  meta = with stdenv.lib; {
+    description = "Ccache with Cloud Storage";
+    homepage = https://github.com/mozilla/sccache;
+    maintainers = with maintainers; [ doronbehar ];
+    license = licenses.asl20;
+    platforms = platforms.unix;
+  };
+}