nixpkgs/pkgs/by-name/sc/sccache/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

46 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, rustPlatform
, pkg-config
, openssl
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
version = "0.8.2";
pname = "sccache";
src = fetchFromGitHub {
owner = "mozilla";
repo = "sccache";
rev = "v${version}";
sha256 = "sha256-HqTPC7J3hf5+dcsWlqc/FR7ev3f6J4jxhDwgM4GxYww=";
};
cargoHash = "sha256-ZUdjdKUUrQCUjwTh+T61Wn5gle4kzAbi3P1LvkS+NfQ=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
# Tests fail because of client server setup which is not possible inside the
# pure environment, see https://github.com/mozilla/sccache/issues/460
doCheck = false;
meta = with lib; {
description = "Ccache with Cloud Storage";
mainProgram = "sccache";
homepage = "https://github.com/mozilla/sccache";
changelog = "https://github.com/mozilla/sccache/releases/tag/v${version}";
maintainers = with maintainers; [ doronbehar figsoda ];
license = licenses.asl20;
};
}