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
875 B
Nix
30 lines
875 B
Nix
{ lib, stdenv, fetchFromGitHub, pkg-config, rustPlatform, Security, curl, openssl, libiconv }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cargo-fund";
|
|
version = "0.2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "acfoltzer";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "1jim5bgq3fc33391qpa1q1csbzqf4hk1qyfzwxpcs5pb4ixb6vgk";
|
|
};
|
|
|
|
cargoSha256 = "181gcmaw2w5a6ah8a2ahsnc1zkadpmx1azkwh2a6x8myhzw2dxsj";
|
|
|
|
# The tests need a GitHub API token.
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security libiconv curl ];
|
|
|
|
meta = with lib; {
|
|
description = "Discover funding links for your project's dependencies";
|
|
homepage = "https://github.com/acfoltzer/cargo-fund";
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
maintainers = with maintainers; [ johntitor ];
|
|
};
|
|
}
|