Loading pkgs/tools/misc/bat-extras/buildBatExtrasPkg.nix +9 −5 Original line number Diff line number Diff line Loading @@ -8,10 +8,12 @@ fish, getconf, makeWrapper, nushell, zsh, }: let cleanArgs = lib.flip removeAttrs [ "name" "dependencies" "meta" ]; Loading @@ -26,6 +28,7 @@ stdenv.mkDerivation ( finalAttrs: cleanArgs args // { pname = name; inherit (core) version; src = core; Loading @@ -35,24 +38,25 @@ stdenv.mkDerivation ( buildInputs = dependencies; # Patch shebangs now because our tests rely on them postPatch = '' postPatch = (args.postPatch or "") + '' patchShebangs --host bin/${name} ''; dontConfigure = true; dontBuild = true; # we've already built dontBuild = true; # we've already built it doCheck = true; doCheck = args.doCheck or true; nativeCheckInputs = [ bat bash fish nushell zsh ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]); checkPhase = '' runHook preCheck bash ./test.sh --compiled --suite ${name} bash ./test.sh --compiled --suite ${name} --verbose --snapshot:show runHook postCheck ''; Loading @@ -69,7 +73,7 @@ stdenv.mkDerivation ( runHook postInstall ''; # We already patched # We have already patched dontPatchShebangs = true; meta = core.meta // { mainProgram = name; } // meta; Loading pkgs/tools/misc/bat-extras/modules/batgrep.nix +3 −0 Original line number Diff line number Diff line Loading @@ -11,5 +11,8 @@ buildBatExtrasPkg { coreutils ripgrep ]; # The tests are broken with the new bat 0.26.0 # https://github.com/eth-p/bat-extras/issues/143 doCheck = false; meta.description = "Quickly search through and highlight files using ripgrep"; } pkgs/tools/misc/bat-extras/modules/batpipe.nix +15 −1 Original line number Diff line number Diff line { lib, stdenv, buildBatExtrasPkg, less, procps, }: buildBatExtrasPkg { name = "batpipe"; dependencies = [ less ]; dependencies = [ less procps ]; patches = [ ../patches/batpipe-skip-outdated-test.patch ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ../patches/batpipe-skip-detection-tests.patch ]; meta.description = "Less (and soon bat) preprocessor for viewing more types of files in the terminal"; } pkgs/tools/misc/bat-extras/modules/core.nix +7 −7 Original line number Diff line number Diff line Loading @@ -7,17 +7,18 @@ fish, getconf, nix-update-script, nushell, zsh, }: stdenv.mkDerivation rec { stdenv.mkDerivation { pname = "bat-extras"; version = "2024.08.24"; version = "2024.08.24-unstable-2025-02-22"; src = fetchFromGitHub { owner = "eth-p"; repo = "bat-extras"; tag = "v${version}"; hash = "sha256-xkND/w6UNC58dC8WrsifwjqU9ZI4yUUq+ZljkhhUNT8="; rev = "3860f0f1481f1d0e117392030f55ef19cc018ee4"; hash = "sha256-9TEq/LzE1Pty1Z3WFWR/TaNNKPp2LGBr0jzGBkOEGQo="; fetchSubmodules = true; }; Loading @@ -26,8 +27,6 @@ stdenv.mkDerivation rec { dontConfigure = true; patches = [ ../patches/disable-theme-tests.patch ]; postPatch = '' patchShebangs --build test.sh test/shimexec .test-framework/bin/best.sh ''; Loading @@ -43,6 +42,7 @@ stdenv.mkDerivation rec { nativeCheckInputs = [ bash fish nushell zsh ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]); Loading Loading @@ -72,7 +72,7 @@ stdenv.mkDerivation rec { # The per-script derivations will go ahead and patch the files they actually install. dontPatchShebangs = true; passthru.updateScript = nix-update-script { }; passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; meta = { description = "Bash scripts that integrate bat with various command line tools"; Loading pkgs/tools/misc/bat-extras/patches/batpipe-skip-detection-tests.patch 0 → 100644 +20 −0 Original line number Diff line number Diff line diff --git a/test/suite/batpipe.sh b/test/suite/batpipe.sh index e834f6e..da87411 100644 --- a/test/suite/batpipe.sh +++ b/test/suite/batpipe.sh @@ -12,6 +12,7 @@ test:detected_bash_shell() { test:detected_fish_shell() { description "Test it can detect a fish shell." + skip "This test fails in the Nix sandbox" # Note: We don't use bash's `-c` option when testing with a fake fish shell. # Bash `-c` will automatically exec() into the last process, which loses the @@ -28,6 +29,7 @@ test:detected_fish_shell() { test:detected_nu_shell() { description "Test it can detect a nushell shell." + skip "This test fails in the Nix sandbox" # Note: We don't use bash's `-c` option when testing with a fake nu shell. # Bash `-c` will automatically exec() into the last process, which loses the Loading
pkgs/tools/misc/bat-extras/buildBatExtrasPkg.nix +9 −5 Original line number Diff line number Diff line Loading @@ -8,10 +8,12 @@ fish, getconf, makeWrapper, nushell, zsh, }: let cleanArgs = lib.flip removeAttrs [ "name" "dependencies" "meta" ]; Loading @@ -26,6 +28,7 @@ stdenv.mkDerivation ( finalAttrs: cleanArgs args // { pname = name; inherit (core) version; src = core; Loading @@ -35,24 +38,25 @@ stdenv.mkDerivation ( buildInputs = dependencies; # Patch shebangs now because our tests rely on them postPatch = '' postPatch = (args.postPatch or "") + '' patchShebangs --host bin/${name} ''; dontConfigure = true; dontBuild = true; # we've already built dontBuild = true; # we've already built it doCheck = true; doCheck = args.doCheck or true; nativeCheckInputs = [ bat bash fish nushell zsh ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]); checkPhase = '' runHook preCheck bash ./test.sh --compiled --suite ${name} bash ./test.sh --compiled --suite ${name} --verbose --snapshot:show runHook postCheck ''; Loading @@ -69,7 +73,7 @@ stdenv.mkDerivation ( runHook postInstall ''; # We already patched # We have already patched dontPatchShebangs = true; meta = core.meta // { mainProgram = name; } // meta; Loading
pkgs/tools/misc/bat-extras/modules/batgrep.nix +3 −0 Original line number Diff line number Diff line Loading @@ -11,5 +11,8 @@ buildBatExtrasPkg { coreutils ripgrep ]; # The tests are broken with the new bat 0.26.0 # https://github.com/eth-p/bat-extras/issues/143 doCheck = false; meta.description = "Quickly search through and highlight files using ripgrep"; }
pkgs/tools/misc/bat-extras/modules/batpipe.nix +15 −1 Original line number Diff line number Diff line { lib, stdenv, buildBatExtrasPkg, less, procps, }: buildBatExtrasPkg { name = "batpipe"; dependencies = [ less ]; dependencies = [ less procps ]; patches = [ ../patches/batpipe-skip-outdated-test.patch ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ../patches/batpipe-skip-detection-tests.patch ]; meta.description = "Less (and soon bat) preprocessor for viewing more types of files in the terminal"; }
pkgs/tools/misc/bat-extras/modules/core.nix +7 −7 Original line number Diff line number Diff line Loading @@ -7,17 +7,18 @@ fish, getconf, nix-update-script, nushell, zsh, }: stdenv.mkDerivation rec { stdenv.mkDerivation { pname = "bat-extras"; version = "2024.08.24"; version = "2024.08.24-unstable-2025-02-22"; src = fetchFromGitHub { owner = "eth-p"; repo = "bat-extras"; tag = "v${version}"; hash = "sha256-xkND/w6UNC58dC8WrsifwjqU9ZI4yUUq+ZljkhhUNT8="; rev = "3860f0f1481f1d0e117392030f55ef19cc018ee4"; hash = "sha256-9TEq/LzE1Pty1Z3WFWR/TaNNKPp2LGBr0jzGBkOEGQo="; fetchSubmodules = true; }; Loading @@ -26,8 +27,6 @@ stdenv.mkDerivation rec { dontConfigure = true; patches = [ ../patches/disable-theme-tests.patch ]; postPatch = '' patchShebangs --build test.sh test/shimexec .test-framework/bin/best.sh ''; Loading @@ -43,6 +42,7 @@ stdenv.mkDerivation rec { nativeCheckInputs = [ bash fish nushell zsh ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ getconf ]); Loading Loading @@ -72,7 +72,7 @@ stdenv.mkDerivation rec { # The per-script derivations will go ahead and patch the files they actually install. dontPatchShebangs = true; passthru.updateScript = nix-update-script { }; passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; meta = { description = "Bash scripts that integrate bat with various command line tools"; Loading
pkgs/tools/misc/bat-extras/patches/batpipe-skip-detection-tests.patch 0 → 100644 +20 −0 Original line number Diff line number Diff line diff --git a/test/suite/batpipe.sh b/test/suite/batpipe.sh index e834f6e..da87411 100644 --- a/test/suite/batpipe.sh +++ b/test/suite/batpipe.sh @@ -12,6 +12,7 @@ test:detected_bash_shell() { test:detected_fish_shell() { description "Test it can detect a fish shell." + skip "This test fails in the Nix sandbox" # Note: We don't use bash's `-c` option when testing with a fake fish shell. # Bash `-c` will automatically exec() into the last process, which loses the @@ -28,6 +29,7 @@ test:detected_fish_shell() { test:detected_nu_shell() { description "Test it can detect a nushell shell." + skip "This test fails in the Nix sandbox" # Note: We don't use bash's `-c` option when testing with a fake nu shell. # Bash `-c` will automatically exec() into the last process, which loses the