push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
{
lib,
buildBatExtrasPkg,
less,
coreutils,
gitMinimal,
delta,
withDelta ? true,
}:
buildBatExtrasPkg {
name = "batdiff";
dependencies = [
less
coreutils
gitMinimal
]
++ lib.optional withDelta delta;
meta.description = "Diff a file against the current git index, or display the diff between two files";
}

View File

@@ -0,0 +1,15 @@
{
buildBatExtrasPkg,
less,
coreutils,
ripgrep,
}:
buildBatExtrasPkg {
name = "batgrep";
dependencies = [
less
coreutils
ripgrep
];
meta.description = "Quickly search through and highlight files using ripgrep";
}

View File

@@ -0,0 +1,11 @@
{
lib,
stdenv,
buildBatExtrasPkg,
util-linux,
}:
buildBatExtrasPkg {
name = "batman";
dependencies = lib.optional stdenv.targetPlatform.isLinux util-linux;
meta.description = "Read system manual pages (man) using bat as the manual page formatter";
}

View File

@@ -0,0 +1,9 @@
{
buildBatExtrasPkg,
less,
}:
buildBatExtrasPkg {
name = "batpipe";
dependencies = [ less ];
meta.description = "Less (and soon bat) preprocessor for viewing more types of files in the terminal";
}

View File

@@ -0,0 +1,18 @@
{
lib,
buildBatExtrasPkg,
less,
coreutils,
entr,
withEntr ? true,
}:
buildBatExtrasPkg {
name = "batwatch";
dependencies = [
less
coreutils
]
++ lib.optional withEntr entr;
meta.description = "Watch for changes in one or more files, and print them with bat";
}

View File

@@ -0,0 +1,87 @@
{
lib,
fetchFromGitHub,
stdenv,
bash,
bat,
fish,
getconf,
nix-update-script,
zsh,
}:
stdenv.mkDerivation rec {
pname = "bat-extras";
version = "2024.08.24";
src = fetchFromGitHub {
owner = "eth-p";
repo = "bat-extras";
tag = "v${version}";
hash = "sha256-xkND/w6UNC58dC8WrsifwjqU9ZI4yUUq+ZljkhhUNT8=";
fetchSubmodules = true;
};
# bat needs to be in the PATH during building so EXECUTABLE_BAT picks it up
nativeBuildInputs = [ bat ];
dontConfigure = true;
patches = [ ../patches/disable-theme-tests.patch ];
postPatch = ''
patchShebangs --build test.sh test/shimexec .test-framework/bin/best.sh
'';
buildPhase = ''
runHook preBuild
bash ./build.sh --minify=none --no-verify
runHook postBuild
'';
# Run the library tests as they don't have external dependencies
doCheck = true;
nativeCheckInputs = [
bash
fish
zsh
]
++ (lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]);
checkPhase = ''
runHook preCheck
# test list repeats suites. Unique them
declare -A test_suites
while read -r action arg _; do
[[ "$action" == "test_suite" && "$arg" == lib_* ]] &&
test_suites+=(["$arg"]=1)
done <<<"$(./test.sh --compiled --list --porcelain)"
(( ''${#test_suites[@]} != 0 )) || {
echo "Couldn't find any library test suites"
exit 1
}
./test.sh --compiled $(printf -- "--suite %q\n" "''${!test_suites[@]}")
runHook postCheck
'';
installPhase = ''
runHook preInstall
cp -a . $out
runHook postInstall
'';
# A few random files have shebangs. Don't patch them, they don't make it into the final output.
# The per-script derivations will go ahead and patch the files they actually install.
dontPatchShebangs = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Bash scripts that integrate bat with various command line tools";
homepage = "https://github.com/eth-p/bat-extras";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [
bbigras
perchun
];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
buildBatExtrasPkg,
shfmt,
clang-tools,
prettier,
rustfmt,
withShFmt ? true,
withPrettier ? true,
withClangTools ? true,
withRustFmt ? true,
}:
buildBatExtrasPkg {
name = "prettybat";
dependencies =
lib.optional withShFmt shfmt
++ lib.optional withPrettier prettier
++ lib.optional withClangTools clang-tools
++ lib.optional withRustFmt rustfmt;
meta.description = "Pretty-print source code and highlight it with bat";
}