build(package/prettify-log): nix package

This commit is contained in:
2025-02-01 00:32:10 +00:00
parent 46ab7d9e52
commit a13025868a
3 changed files with 40 additions and 9 deletions

View File

@@ -56,6 +56,12 @@
printprogress = pkgs.callPackage ./package/printprogress.nix {}; printprogress = pkgs.callPackage ./package/printprogress.nix {};
colorize = pkgs.callPackage ./package/colorize.nix {}; colorize = pkgs.callPackage ./package/colorize.nix {};
gh_translabeles = pkgs.callPackage ./package/github/gh_translabeles.nix {}; gh_translabeles = pkgs.callPackage ./package/github/gh_translabeles.nix {};
prettify-log = pkgs.callPackage ./package/prettify-log/default.nix { inherit (self.lib) cargoToml; nativeBuildInputs =
[
pkgs.pkgsBuildHost.rust-bin.stable."1.81.0".default
pkgs.pkg-config
];
};
}; };
devShells.${system} = devShells.${system} =
@@ -66,6 +72,7 @@
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = (with self.packages.${system}; [ buildInputs = (with self.packages.${system}; [
nvim-alias nvim-alias
prettify-log
]) ++ (with pkgs; [ ]) ++ (with pkgs; [
jq jq
yq-go yq-go
@@ -73,8 +80,9 @@
]); ]);
# environment # environment
PAGER=''nvim -R -c 'set buftype=nofile' -c 'nnoremap q :q!<CR>' -c 'set nowrap' \ PAGER=''nvim -R --clean -c 'set buftype=nofile' -c 'nnoremap q :q!<CR>' -c 'set nowrap' \
-c 'set runtimepath^=${pkgs.vimPlugins.vim-plugin-AnsiEsc}' -c 'runtime! plugin/*.vim' -c 'AnsiEsc' -''; -c 'set runtimepath^=${pkgs.vimPlugins.vim-plugin-AnsiEsc}' \
-c 'runtime! plugin/*.vim' -c 'AnsiEsc' -'';
# ^^^^^^^^^^^^^^^^^^^^ # ^^^^^^^^^^^^^^^^^^^^
# Prevents Neovim from treating the buffer as a file # Prevents Neovim from treating the buffer as a file
# ^^^^^^^^^^^^^^^^^^^^ # ^^^^^^^^^^^^^^^^^^^^
@@ -130,7 +138,7 @@
throw (envErrorMessage varName); throw (envErrorMessage varName);
# -- Cargo.toml -- # -- Cargo.toml --
cargo = src: (builtins.fromTOML (builtins.readFile "${src}/Cargo.toml")); cargoToml = src: (builtins.fromTOML (builtins.readFile "${src}/Cargo.toml"));
ssh.keys = { ssh.keys = {
hetzner-test = { hetzner-test = {

8
large_file.json Normal file
View File

@@ -0,0 +1,8 @@
[
{
"c": "unique_text_1",
"ln": "en_US",
"lb": "l1",
"s": "0000000000000000000000000000000000000000000000000000000000000001"
}
]

View File

@@ -0,0 +1,15 @@
{ cargoToml, nativeBuildInputs, pkgs, ... }:
let
src = ./.;
cargo = cargoToml src;
in
pkgs.rustPlatform.buildRustPackage {
pname = cargo.package.name;
version = cargo.package.version;
inherit nativeBuildInputs src;
cargoLock.lockFile = ./Cargo.lock;
doCheck = true;
}