-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nix builder, extract pre-commit hooks
- Loading branch information
1 parent
dbb7aa7
commit 25370f2
Showing
5 changed files
with
62 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
stdenv, | ||
lib, | ||
withDevBinaries ? false, | ||
}: | ||
stdenv.mkDerivation { | ||
name = "crash"; | ||
version = "0.1"; | ||
|
||
src = ./..; | ||
makeFlags = ["PREFIX=${placeholder "out"}"]; | ||
|
||
buildFlags = ["crash"] ++ (lib.optional withDevBinaries ["debug" "check"]); | ||
|
||
postInstall = lib.optional withDevBinaries '' | ||
install -Dm755 -t $out/bin debug | ||
install -Dm755 -t $out/bin check | ||
''; | ||
|
||
meta = { | ||
description = "Crash resilient auspicious shell."; | ||
maintainers = with lib.maintainers; [savalet sigmanificient]; | ||
license = lib.licenses.mit; | ||
platforms = lib.platforms.linux; | ||
mainProgram = "crash"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{pkgs}: let | ||
pyrun = name: pkgs.python310.interpreter + " " + name; | ||
in { | ||
alejandra.enable = true; | ||
black.enable = true; | ||
trim-trailing-whitespace.enable = true; | ||
|
||
commit-name = { | ||
enable = true; | ||
name = "check commit name"; | ||
stages = ["commit-msg"]; | ||
entry = pyrun ../scripts/check_commit_msg.py; | ||
}; | ||
|
||
check-include-order = { | ||
enable = true; | ||
name = "check include order"; | ||
entry = pyrun ../scripts/check_include_order.py; | ||
}; | ||
} |