onefetch: migrate to by-name

This commit is contained in:
TheSola10 2024-11-10 21:37:16 +01:00
parent 95855a90f9
commit 922b38af87
No known key found for this signature in database
GPG Key ID: 89245619BEBB95BA
3 changed files with 32 additions and 21 deletions

View File

@ -1,17 +1,20 @@
{ lib
, rustPlatform
, fetchFromGitHub
, cmake
, installShellFiles
, pkg-config
, zstd
, stdenv
, CoreFoundation
, libresolv
, Security
, git
{
lib,
rustPlatform,
fetchFromGitHub,
cmake,
installShellFiles,
pkg-config,
zstd,
stdenv,
darwin,
git,
}:
let
inherit (darwin) libresolv;
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
in
rustPlatform.buildRustPackage rec {
pname = "onefetch";
version = "2.21.0";
@ -30,10 +33,19 @@ rustPlatform.buildRustPackage rec {
./zstd-pkg-config.patch
];
nativeBuildInputs = [ cmake installShellFiles pkg-config ];
nativeBuildInputs = [
cmake
installShellFiles
pkg-config
];
buildInputs = [ zstd ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation libresolv Security ];
buildInputs =
[ zstd ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
CoreFoundation
libresolv
Security
];
nativeCheckInputs = [
git
@ -59,7 +71,11 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/o2sh/onefetch";
changelog = "https://github.com/o2sh/onefetch/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ Br1ght0ne figsoda kloenk ];
maintainers = with maintainers; [
Br1ght0ne
figsoda
kloenk
];
mainProgram = "onefetch";
};
}

View File

@ -4762,11 +4762,6 @@ with pkgs;
ome_zarr = with python3Packages; toPythonApplication ome-zarr;
onefetch = callPackage ../tools/misc/onefetch {
inherit (darwin) libresolv;
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
onlykey = callPackage ../tools/security/onlykey { node_webkit = nwjs; };
openapi-generator-cli = callPackage ../tools/networking/openapi-generator-cli { jre = pkgs.jre_headless; };