1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00
nixpkgs/pkgs/tools/misc/onefetch/default.nix
Benjamin Hipple eb11feaa0b treewide: change fetchCargoTarball default to opt-out
Changes the default fetcher in the Rust Platform to be the newer
`fetchCargoTarball`, and changes every application using the current default to
instead opt out.

This commit does not change any hashes or cause any rebuilds. Once integrated,
we will start deleting the opt-outs and recomputing hashes.

See #79975 for details.
2020-02-13 22:41:37 -08:00

38 lines
1.1 KiB
Nix

{ fetchFromGitHub, rustPlatform, stdenv, fetchpatch
, CoreFoundation, libiconv, libresolv, Security }:
rustPlatform.buildRustPackage rec {
pname = "onefetch";
version = "2.2.0";
src = fetchFromGitHub {
owner = "o2sh";
repo = pname;
rev = "v${version}";
sha256 = "1sgpai3gx3w7w3ilmbnmzgdxdim6klkfiqaqxmffpyap6qgksfqs";
};
# Delete this on next update; see #79975 for details
legacyCargoFetcher = true;
cargoSha256 = "1phv06zf47bv5cmhypivljfiynrblha0kj13c5al9l0hd1xx749h";
buildInputs = with stdenv;
lib.optionals isDarwin [ CoreFoundation libiconv libresolv Security ];
cargoPatches = [
# fix wrong version in Cargo.lock
(fetchpatch {
url = "https://github.com/o2sh/onefetch/commit/b69fe660d72b65d7efac99ac5db3b03a82d8667f.patch";
sha256 = "14przkdyd4yd11xpdgyscs70w9gpnh02j3xdzxf6h895w3mn84lx";
})
];
meta = with stdenv.lib; {
description = "Git repository summary on your terminal";
homepage = "https://github.com/o2sh/onefetch";
license = licenses.mit;
maintainers = with maintainers; [ filalex77 ];
};
}