4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
30 lines
835 B
Nix
30 lines
835 B
Nix
{ lib, stdenv, fetchFromGitHub, rustPlatform
|
|
, pkgconfig, curl, libgit2, openssl, Security }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cargo-raze";
|
|
version = "0.2.10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1fznh8jygzyzphw7762qc2jv0370z7qjqk1vkql0g246iqby8pq9";
|
|
};
|
|
sourceRoot = "source/impl";
|
|
|
|
cargoSha256 = "1z20xc508a3slc1ii3hy09swvlyib14zwf9akxc0h24d5m48as1c";
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
buildInputs = [ curl libgit2 openssl ]
|
|
++ stdenv.lib.optional stdenv.isDarwin Security;
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "Generate Bazel BUILD files from Cargo dependencies";
|
|
homepage = "https://github.com/google/cargo-raze";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ elasticdog ];
|
|
};
|
|
}
|