build(package/prettify-log): nix package
This commit is contained in:
26
flake.nix
26
flake.nix
@@ -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,14 +80,15 @@
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
# 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
|
||||||
# Makes 'q' quit Neovim immediately
|
# ^^^^^^^^^^^^^^^^^^^^
|
||||||
# ^^^^^^^^^^^
|
# Makes 'q' quit Neovim immediately
|
||||||
# Disables text wrapping
|
# ^^^^^^^^^^^
|
||||||
|
# Disables text wrapping
|
||||||
# ^^^^^^^^
|
# ^^^^^^^^
|
||||||
# Enables ANSI color interpretation
|
# Enables ANSI color interpretation
|
||||||
};
|
};
|
||||||
@@ -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
8
large_file.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"c": "unique_text_1",
|
||||||
|
"ln": "en_US",
|
||||||
|
"lb": "l1",
|
||||||
|
"s": "0000000000000000000000000000000000000000000000000000000000000001"
|
||||||
|
}
|
||||||
|
]
|
||||||
15
package/prettify-log/default.nix
Normal file
15
package/prettify-log/default.nix
Normal 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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user