From e1ab8ae4a9316bc4e3efe67a6aedeed0d0575fbf Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 22 Jun 2019 14:16:59 +0300 Subject: [PATCH 1/2] sccache: init at 0.2.8 --- .../tools/misc/sccache/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/tools/misc/sccache/default.nix diff --git a/pkgs/development/tools/misc/sccache/default.nix b/pkgs/development/tools/misc/sccache/default.nix new file mode 100644 index 000000000000..c04a92dbb690 --- /dev/null +++ b/pkgs/development/tools/misc/sccache/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, cargo, rustc, rustPlatform, pkgconfig, glib, openssl }: + +rustPlatform.buildRustPackage rec { + version = "0.2.8"; + name = "sccache-${version}"; + + src = fetchFromGitHub { + owner = "mozilla"; + repo = "sccache"; + rev = version; + sha256 = "08v8s24q6246mdjzl5lirqg0csxcmd17szmw4lw373hvq4xvf0yk"; + }; + cargoSha256 = "1lafzin92h1hb1hqmbrsxja44nj8mpbsxhwcjr6rf5yrclgwmcxj"; + cargoBuildFlags = [ "--features=all" ]; + nativeBuildInputs = [ + pkgconfig cargo rustc + ]; + buildInputs = [ + openssl + ]; + # 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f99abb2315bf..59f36c4684d8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24135,6 +24135,8 @@ in iterm2 = callPackage ../applications/misc/iterm2 {}; + sccache = callPackage ../development/tools/misc/sccache { }; + sequeler = callPackage ../applications/misc/sequeler { }; sequelpro = callPackage ../applications/misc/sequelpro {}; From 50602eb299572362848c3ba9afb8dac2bf0c8fd6 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 23 Jun 2019 09:14:26 +0300 Subject: [PATCH 2/2] Add darwin specific dependencies --- pkgs/development/tools/misc/sccache/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/sccache/default.nix b/pkgs/development/tools/misc/sccache/default.nix index c04a92dbb690..52bf5e9a8539 100644 --- a/pkgs/development/tools/misc/sccache/default.nix +++ b/pkgs/development/tools/misc/sccache/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cargo, rustc, rustPlatform, pkgconfig, glib, openssl }: +{ stdenv, fetchFromGitHub, cargo, rustc, rustPlatform, pkgconfig, glib, openssl, darwin }: rustPlatform.buildRustPackage rec { version = "0.2.8"; @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { ]; 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;