nixpkgs/pkgs/development/tools/misc/sccache/default.nix

37 lines
1.2 KiB
Nix
Raw Normal View History

2019-06-22 23:14:26 -07:00
{ stdenv, fetchFromGitHub, cargo, rustc, rustPlatform, pkgconfig, glib, openssl, darwin }:
2019-06-22 04:16:59 -07:00
rustPlatform.buildRustPackage rec {
2019-07-01 09:21:43 -07:00
version = "0.2.9";
2019-06-22 04:16:59 -07:00
name = "sccache-${version}";
src = fetchFromGitHub {
owner = "mozilla";
repo = "sccache";
rev = version;
2019-07-01 09:21:43 -07:00
sha256 = "0glaaan6fh19a2d8grgsgnbgw5w53vjl0qmvvnq0ldp3hax90v46";
2019-06-22 04:16:59 -07:00
};
2019-07-01 09:21:43 -07:00
cargoSha256 = "0chfdyhj9lyxydbnmldc8rh2v9dda46sxhv35g34a5137sjrizfh";
2019-06-22 04:16:59 -07:00
cargoBuildFlags = [ "--features=all" ];
2019-07-01 09:21:43 -07:00
# see https://github.com/mozilla/sccache/issues/467
postPatch = ''
sed -i 's/\(version = "0.2.9\)-alpha.0"/\1"/g' Cargo.lock
'';
2019-06-22 04:16:59 -07:00
nativeBuildInputs = [
pkgconfig cargo rustc
];
buildInputs = [
openssl
2019-06-22 23:14:26 -07:00
] ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
2019-06-22 04:16:59 -07:00
# 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;
};
}