Skip to content

Instantly share code, notes, and snippets.

@phanirithvij
Created November 23, 2024 19:43
Show Gist options
  • Save phanirithvij/1884eb1d3817be4b8fd00c434eee0bbf to your computer and use it in GitHub Desktop.
Save phanirithvij/1884eb1d3817be4b8fd00c434eee0bbf to your computer and use it in GitHub Desktop.
patch for ufetch 0.3->0.4
diff --git a/pkgs/by-name/uf/ufetch/0001-optimize-packages-command.patch b/pkgs/by-name/uf/ufetch/0001-optimize-packages-command.patch
deleted file mode 100644
index e303db4968a8..000000000000
--- a/pkgs/by-name/uf/ufetch/0001-optimize-packages-command.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/ufetch-nixos b/ufetch-nixos
-index 2ca8f9d..5102cd7 100755
---- a/ufetch-nixos
-+++ b/ufetch-nixos
-@@ -9,9 +9,14 @@ host="$(hostname)"
- os="$(nixos-version)"
- kernel="$(uname -sr)"
- uptime="$(uptime | awk -F, '{sub(".*up ",x,$1);print $1}' | sed -e 's/^[ \t]*//')"
--packages="$(ls -d -1 /nix/store/*/ | wc -l)"
- shell="$(basename "${SHELL}")"
-
-+for profile in $NIX_PROFILES; do
-+ if [ -d "$profile" ]; then
-+ packages="$((packages + $( (nix-store -q --requisites "$profile" 2>/dev/null || true) | wc -l)))"
-+ fi
-+done
-+
- ## UI DETECTION
-
- parse_rcs() {
diff --git a/pkgs/by-name/uf/ufetch/package.nix b/pkgs/by-name/uf/ufetch/package.nix
index 4e8e3311467a..7241450b9cc4 100644
--- a/pkgs/by-name/uf/ufetch/package.nix
+++ b/pkgs/by-name/uf/ufetch/package.nix
@@ -9,17 +9,15 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ufetch";
- version = "0.3";
+ version = "0.4";
src = fetchFromGitLab {
owner = "jschx";
repo = "ufetch";
rev = "v${finalAttrs.version}";
- hash = "sha256-1LtVCJrkdI2AUdF5d/OBCoSqjlbZI810cxtcuOs/YWs=";
+ hash = "sha256-icrf7OjDageBRSBD40wX2ZzCvB6T5n0jgd5aRROGqCA=";
};
- patches = [ ./0001-optimize-packages-command.patch ];
-
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/licenses/${finalAttrs.pname}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment