-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hyfetch: init at 1.99.0-unstable-2024-10-23 (#118)
* hyfetch: init at 1.99.0-unstable-2024-10-23 * neowofetch: only enable x11 support by default on linux * ci: don't check all systems some packages are broken by deps on lower tier platforms. ci doesn't need to fail over them
- Loading branch information
Showing
3 changed files
with
156 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
lib, | ||
fastfetch, | ||
fetchFromGitHub, | ||
installShellFiles, | ||
macchina, | ||
makeBinaryWrapper, | ||
neowofetch, | ||
rustPlatform, | ||
unstableGitUpdater, | ||
withAutocomplete ? true, | ||
withColor ? true, | ||
withFastfetch ? true, | ||
withMacchina ? true, | ||
}: | ||
|
||
let | ||
binPath = [ | ||
neowofetch | ||
] ++ lib.optional withFastfetch fastfetch ++ lib.optional withMacchina macchina; | ||
in | ||
rustPlatform.buildRustPackage rec { | ||
pname = "hyfetch"; | ||
version = "1.99.0-unstable-2024-10-23"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "hykilpikonna"; | ||
repo = "hyfetch"; | ||
rev = "b5b49ecbc095ac20e49c0783121c885752df9001"; | ||
hash = "sha256-W1oMzLACGDvcl8du4L3TuUn79i6HFUFuPEJhc3IPD0E="; | ||
}; | ||
|
||
# https://github.com/hykilpikonna/hyfetch/pull/361 | ||
# | ||
# Upstream will call `neowofetch` with Bash (from the PATH) by default | ||
# We know `neowofetch` has a shebang though, so run it directly to avoid | ||
# adding Bash to the wrapper | ||
# | ||
# Yes, this introduces 2 warnings | ||
postPatch = '' | ||
substituteInPlace crates/hyfetch/src/neofetch_util.rs \ | ||
--replace-fail 'command.arg(neofetch_path)' 'let mut command = Command::new(neofetch_path)' | ||
''; | ||
|
||
cargoHash = "sha256-4Tz6hqzjlCT5PSa1AzWGU6mBHWxMcsJm9+Uzmsvurps="; | ||
|
||
strictDeps = true; | ||
|
||
nativeBuildInputs = [ | ||
installShellFiles | ||
makeBinaryWrapper | ||
]; | ||
|
||
cargoBuildNoDefaultFeatures = true; | ||
cargoBuildFeatures = | ||
lib.optional withAutocomplete "autocomplete" | ||
++ lib.optional withColor "color" | ||
++ lib.optional withMacchina "macchina"; | ||
|
||
cargoBuildFlags = [ "--package hyfetch" ]; | ||
cargoTestFlags = cargoBuildFlags; | ||
|
||
postInstall = '' | ||
installManPage docs/hyfetch.1 | ||
''; | ||
|
||
postFixup = '' | ||
wrapProgram "$out"/bin/hyfetch \ | ||
--prefix PATH : ${lib.makeBinPath binPath} | ||
''; | ||
|
||
passthru = { | ||
updateScript = unstableGitUpdater { }; | ||
}; | ||
|
||
meta = { | ||
description = "neofetch with pride flags <3"; | ||
longDescription = '' | ||
HyFetch is a command-line system information tool fork of neofetch. | ||
HyFetch displays information about your system next to your OS logo | ||
in ASCII representation. The ASCII representation is then colored in | ||
the pattern of the pride flag of your choice. The main purpose of | ||
HyFetch is to be used in screenshots to show other users what | ||
operating system or distribution you are running, what theme or | ||
icon set you are using, etc. | ||
''; | ||
homepage = "https://github.com/hykilpikonna/HyFetch"; | ||
license = lib.licenses.mit; | ||
maintainers = with lib.maintainers; [ getchoo ]; | ||
mainProgram = "hyfetch"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
lib, | ||
bash, | ||
hyfetch, | ||
installShellFiles, | ||
makeBinaryWrapper, | ||
pciutils, | ||
stdenvNoCC, | ||
ueberzug, | ||
withX11Support ? stdenvNoCC.hostPlatform.isLinux, | ||
}: | ||
|
||
stdenvNoCC.mkDerivation (finalAttrs: { | ||
pname = "neowofetch"; | ||
|
||
inherit (hyfetch) version src; | ||
|
||
strictDeps = true; | ||
|
||
nativeBuildInputs = [ | ||
installShellFiles | ||
makeBinaryWrapper | ||
]; | ||
|
||
buildInputs = [ bash ]; | ||
|
||
dontConfigure = true; | ||
dontBuild = true; | ||
|
||
postInstall = '' | ||
mv {neo,neowo}fetch | ||
installBin neowofetch | ||
mv docs/{neo,neowo}fetch.1 | ||
installManPage docs/neowofetch.1 | ||
''; | ||
|
||
postFixup = '' | ||
wrapProgram "$out"/bin/neowofetch \ | ||
--prefix PATH : ${lib.makeBinPath finalAttrs.passthru.binPath} | ||
''; | ||
|
||
passthru = { | ||
binPath = [ pciutils ] ++ lib.optional withX11Support ueberzug; | ||
}; | ||
|
||
meta = { | ||
description = "Fast, highly customizable system info script (Maintained fork)"; | ||
homepage = "https://github.com/hykilpikonna/hyfetch"; | ||
changelog = "https://github.com/hykilpikonna/hyfetch/releases/tag/${finalAttrs.version}"; | ||
license = lib.licenses.mit; | ||
maintainers = with lib.maintainers; [ getchoo ]; | ||
mainProgram = "neowofetch"; | ||
}; | ||
}) |