diff --git a/pkgs/tools/misc/onefetch/default.nix b/pkgs/by-name/on/onefetch/package.nix similarity index 63% rename from pkgs/tools/misc/onefetch/default.nix rename to pkgs/by-name/on/onefetch/package.nix index 2beca6a81501..72c2bdbc2eac 100644 --- a/pkgs/tools/misc/onefetch/default.nix +++ b/pkgs/by-name/on/onefetch/package.nix @@ -1,39 +1,48 @@ -{ 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; +in rustPlatform.buildRustPackage rec { pname = "onefetch"; - version = "2.21.0"; + version = "2.22.0"; src = fetchFromGitHub { owner = "o2sh"; repo = pname; rev = version; - hash = "sha256-KQs7b+skXQhHbfHIJkgowNY2FB6oS2V8TQFdkmElC/k="; + hash = "sha256-Gk1hoC6qsLYm7DbbaRSur6GdC9yXQe+mYLUJklXIwZ4="; }; - cargoHash = "sha256-gKA1MMahoaDFia8LR33GG3jRttZzHwpUpFawlCQcy7g="; + cargoHash = "sha256-4YB10uj4ULhvhn+Yv0dRZO8fRxwm3lEAZ5v+MYHO7lI="; cargoPatches = [ # enable pkg-config feature of zstd ./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 [ + libresolv + ]; nativeCheckInputs = [ git @@ -59,7 +68,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"; }; } diff --git a/pkgs/tools/misc/onefetch/zstd-pkg-config.patch b/pkgs/by-name/on/onefetch/zstd-pkg-config.patch similarity index 95% rename from pkgs/tools/misc/onefetch/zstd-pkg-config.patch rename to pkgs/by-name/on/onefetch/zstd-pkg-config.patch index 5e85a34d718b..51756917d6da 100644 --- a/pkgs/tools/misc/onefetch/zstd-pkg-config.patch +++ b/pkgs/by-name/on/onefetch/zstd-pkg-config.patch @@ -17,7 +17,6 @@ index a0a2777..ad146cb 100644 @@ -65,6 +65,7 @@ time-humanize = { version = "0.1.3", features = ["time"] } tokei = "12.1.2" typetag = "0.2" - parking_lot = "0.12" +zstd = { version = "*", features = ["pkg-config"] } [dev-dependencies] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index da9f94c711be..7543000e7961 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4655,11 +4655,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; };