1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/misc/sccache/default.nix

37 lines
1.2 KiB
Nix
Raw Normal View History

2019-06-23 07:14:26 +01:00
{ stdenv, fetchFromGitHub, cargo, rustc, rustPlatform, pkgconfig, glib, openssl, darwin }:
2019-06-22 12:16:59 +01:00
rustPlatform.buildRustPackage rec {
2019-07-01 17:21:43 +01:00
version = "0.2.9";
2019-06-22 12:16:59 +01:00
name = "sccache-${version}";
src = fetchFromGitHub {
owner = "mozilla";
repo = "sccache";
rev = version;
2019-07-01 17:21:43 +01:00
sha256 = "0glaaan6fh19a2d8grgsgnbgw5w53vjl0qmvvnq0ldp3hax90v46";
2019-06-22 12:16:59 +01:00
};
2019-07-01 17:21:43 +01:00
cargoSha256 = "0chfdyhj9lyxydbnmldc8rh2v9dda46sxhv35g34a5137sjrizfh";
2019-06-22 12:16:59 +01:00
cargoBuildFlags = [ "--features=all" ];
2019-07-01 17:21:43 +01: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 12:16:59 +01:00
nativeBuildInputs = [
pkgconfig cargo rustc
];
buildInputs = [
openssl
2019-06-23 07:14:26 +01:00
] ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
2019-06-22 12:16:59 +01: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;
};
}