build: support pkg managers installation (#87)
closes #71, #84, #86 - AUR - Homebrew - Nix - Debian (.deb) - RPM (.rpm) - Aqua - ASDF This is my first time doing this, so there might be mistakes. If you can't download it through any pkg manager, please leave a comment or open an issue --------- Co-authored-by: use-the-fork <23747916+use-the-fork@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
amends "package://github.com/jdx/hk/releases/download/v1.50.0/hk@1.50.0#/Config.pkl"
|
||||
|
||||
import "package://github.com/jdx/hk/releases/download/v1.50.0/hk@1.50.0#/Builtins.pkl"
|
||||
|
||||
local linters = new {
|
||||
["pkl"] = Builtins.pkl
|
||||
}
|
||||
|
||||
local formatter = new {
|
||||
["newlines"] = Builtins.newlines
|
||||
["fix-smart-quotes"] = Builtins.fix_smart_quotes
|
||||
["alejandra"] = (Builtins.alejandra) {
|
||||
exclude = List("**/npins/default.nix")
|
||||
}
|
||||
["pkl-format"] = Builtins.pkl_format
|
||||
["just-format"] = Builtins.just_format
|
||||
}
|
||||
|
||||
hooks {
|
||||
["pre-commit"] {
|
||||
fix = true
|
||||
stash = "git"
|
||||
steps {
|
||||
...linters
|
||||
...formatter
|
||||
}
|
||||
}
|
||||
["fix"] {
|
||||
fix = true
|
||||
steps {
|
||||
...linters
|
||||
...formatter
|
||||
}
|
||||
}
|
||||
["check"] {
|
||||
steps {
|
||||
...linters
|
||||
...formatter
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user