build(package/prettify-log): nix package
This commit is contained in:
14
flake.nix
14
flake.nix
@@ -56,6 +56,12 @@
|
||||
printprogress = pkgs.callPackage ./package/printprogress.nix {};
|
||||
colorize = pkgs.callPackage ./package/colorize.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} =
|
||||
@@ -66,6 +72,7 @@
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = (with self.packages.${system}; [
|
||||
nvim-alias
|
||||
prettify-log
|
||||
]) ++ (with pkgs; [
|
||||
jq
|
||||
yq-go
|
||||
@@ -73,8 +80,9 @@
|
||||
]);
|
||||
|
||||
# environment
|
||||
PAGER=''nvim -R -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' -'';
|
||||
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' -'';
|
||||
# ^^^^^^^^^^^^^^^^^^^^
|
||||
# Prevents Neovim from treating the buffer as a file
|
||||
# ^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -130,7 +138,7 @@
|
||||
throw (envErrorMessage varName);
|
||||
|
||||
# -- Cargo.toml --
|
||||
cargo = src: (builtins.fromTOML (builtins.readFile "${src}/Cargo.toml"));
|
||||
cargoToml = src: (builtins.fromTOML (builtins.readFile "${src}/Cargo.toml"));
|
||||
|
||||
ssh.keys = {
|
||||
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