mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
f8c4a98e8e
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"([Tt]he)? ' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Tt]he (.)/\1\U\2/'
56 lines
1.2 KiB
Nix
56 lines
1.2 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, stdenv
|
|
, darwin
|
|
, gcc
|
|
, libcxx
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "fh";
|
|
version = "0.1.10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "DeterminateSystems";
|
|
repo = "fh";
|
|
rev = "v${version}";
|
|
hash = "sha256-fRaKydMSwd1zl6ptBKvn5ej2pqtI8xi9dioFmR8QA+g=";
|
|
};
|
|
|
|
cargoHash = "sha256-iOP5llFtySG8Z2Mj7stt6fYpQWqiQqJuftuYBrbkmyU=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.Security
|
|
gcc.cc.lib
|
|
];
|
|
|
|
env = lib.optionalAttrs stdenv.isDarwin {
|
|
NIX_CFLAGS_COMPILE = "-I${lib.getDev libcxx}/include/c++/v1";
|
|
};
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd fh \
|
|
--bash <($out/bin/fh completion bash) \
|
|
--fish <($out/bin/fh completion fish) \
|
|
--zsh <($out/bin/fh completion zsh)
|
|
'';
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = with lib; {
|
|
description = "Official FlakeHub CLI";
|
|
homepage = "https://github.com/DeterminateSystems/fh";
|
|
changelog = "https://github.com/DeterminateSystems/fh/releases/tag/${src.rev}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
mainProgram = "fh";
|
|
};
|
|
}
|