From 922b38af875e055d178eaa2ef94cdfe96fa0ae9a Mon Sep 17 00:00:00 2001 From: TheSola10 Date: Sun, 10 Nov 2024 21:37:16 +0100 Subject: [PATCH 1/3] onefetch: migrate to by-name --- .../on/onefetch/package.nix} | 48 ++++++++++++------- .../on}/onefetch/zstd-pkg-config.patch | 0 pkgs/top-level/all-packages.nix | 5 -- 3 files changed, 32 insertions(+), 21 deletions(-) rename pkgs/{tools/misc/onefetch/default.nix => by-name/on/onefetch/package.nix} (68%) rename pkgs/{tools/misc => by-name/on}/onefetch/zstd-pkg-config.patch (100%) diff --git a/pkgs/tools/misc/onefetch/default.nix b/pkgs/by-name/on/onefetch/package.nix similarity index 68% rename from pkgs/tools/misc/onefetch/default.nix rename to pkgs/by-name/on/onefetch/package.nix index 2beca6a81501..54e153f4adf1 100644 --- a/pkgs/tools/misc/onefetch/default.nix +++ b/pkgs/by-name/on/onefetch/package.nix @@ -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"; }; } diff --git a/pkgs/tools/misc/onefetch/zstd-pkg-config.patch b/pkgs/by-name/on/onefetch/zstd-pkg-config.patch similarity index 100% rename from pkgs/tools/misc/onefetch/zstd-pkg-config.patch rename to pkgs/by-name/on/onefetch/zstd-pkg-config.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 13d3da983e2f..c81b564d53d1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; }; From 7f0f95aec2c29a39213e1d371673f63ba3f762da Mon Sep 17 00:00:00 2001 From: TheSola10 Date: Thu, 14 Nov 2024 11:04:01 +0100 Subject: [PATCH 2/3] onefetch: darwin sdk fixup --- pkgs/by-name/on/onefetch/package.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/by-name/on/onefetch/package.nix b/pkgs/by-name/on/onefetch/package.nix index 54e153f4adf1..b874dacf0cba 100644 --- a/pkgs/by-name/on/onefetch/package.nix +++ b/pkgs/by-name/on/onefetch/package.nix @@ -13,7 +13,6 @@ let inherit (darwin) libresolv; - inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; in rustPlatform.buildRustPackage rec { pname = "onefetch"; @@ -42,9 +41,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ zstd ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - CoreFoundation libresolv - Security ]; nativeCheckInputs = [ From f4a848a25d59208d2736754f06df2403dabaf48e Mon Sep 17 00:00:00 2001 From: TheSola10 Date: Thu, 14 Nov 2024 11:04:26 +0100 Subject: [PATCH 3/3] onefetch: 2.21.0 -> 2.22.0 --- pkgs/by-name/on/onefetch/package.nix | 6 +++--- pkgs/by-name/on/onefetch/zstd-pkg-config.patch | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/on/onefetch/package.nix b/pkgs/by-name/on/onefetch/package.nix index b874dacf0cba..72c2bdbc2eac 100644 --- a/pkgs/by-name/on/onefetch/package.nix +++ b/pkgs/by-name/on/onefetch/package.nix @@ -16,16 +16,16 @@ let 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 diff --git a/pkgs/by-name/on/onefetch/zstd-pkg-config.patch b/pkgs/by-name/on/onefetch/zstd-pkg-config.patch index 5e85a34d718b..51756917d6da 100644 --- a/pkgs/by-name/on/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]