mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
571c71e6f7
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.
70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchCrate
|
|
, cmake
|
|
, installShellFiles
|
|
, pkg-config
|
|
, ronn
|
|
, stdenv
|
|
, curl
|
|
, libgit2
|
|
, libssh2
|
|
, openssl
|
|
, zlib
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cargo-update";
|
|
version = "16.0.0";
|
|
|
|
src = fetchCrate {
|
|
inherit pname version;
|
|
hash = "sha256-jLv/9Fvg+1HNIhfm0D/vvMR9J+Enztj9rXQE1kZITGI=";
|
|
};
|
|
|
|
cargoHash = "sha256-rwXpQkL6ysMBraLIMk2zQe0vmb9uuePWufBjRVzaBOA=";
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
installShellFiles
|
|
pkg-config
|
|
ronn
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
curl
|
|
];
|
|
|
|
buildInputs = [
|
|
libgit2
|
|
libssh2
|
|
openssl
|
|
zlib
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
curl
|
|
darwin.apple_sdk.frameworks.Security
|
|
];
|
|
|
|
postBuild = ''
|
|
# Man pages contain non-ASCII, so explicitly set encoding to UTF-8.
|
|
HOME=$TMPDIR \
|
|
RUBYOPT="-E utf-8:utf-8" \
|
|
ronn -r --organization="cargo-update developers" man/*.md
|
|
'';
|
|
|
|
postInstall = ''
|
|
installManPage man/*.1
|
|
'';
|
|
|
|
env = {
|
|
LIBGIT2_NO_VENDOR = 1;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Cargo subcommand for checking and applying updates to installed executables";
|
|
homepage = "https://github.com/nabijaczleweli/cargo-update";
|
|
changelog = "https://github.com/nabijaczleweli/cargo-update/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ gerschtli Br1ght0ne johntitor matthiasbeyer ];
|
|
};
|
|
}
|