-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from Uzaaft/feat/nix-ci
build(nix): add alejandra and formatting nix code to CI
- Loading branch information
Showing
5 changed files
with
86 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ jobs: | |
run: | | ||
nix develop -c ruff check | ||
nix develop -c ruff format --check | ||
nix develop -c alejandra --check . |
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 |
---|---|---|
@@ -1,34 +1,45 @@ | ||
{ mkShell, lib, stdenv | ||
{ | ||
mkShell, | ||
lib, | ||
stdenv, | ||
# Deps | ||
poetry, | ||
python3, | ||
# Our app | ||
pythonApp, | ||
# Deps for ci | ||
alejandra, | ||
}: let | ||
rpathLibs = | ||
[ | ||
# None yet | ||
] | ||
++ lib.optionals stdenv.isLinux [ | ||
# None yet | ||
]; | ||
in | ||
mkShell rec { | ||
name = "ghostty-discord-bot"; | ||
|
||
# Deps | ||
, poetry | ||
, python3 | ||
nativeBuildInputs = | ||
[ | ||
# Python lib | ||
python3 | ||
poetry | ||
] | ||
++ lib.optionals stdenv.isLinux [ | ||
# None yet | ||
]; | ||
|
||
# Our app | ||
, pythonApp | ||
}: | ||
let | ||
rpathLibs = [ | ||
# None yet | ||
] ++ lib.optionals stdenv.isLinux [ | ||
# None yet | ||
]; | ||
packages = [ | ||
# Required for CI for format checking. | ||
alejandra | ||
]; | ||
|
||
in mkShell rec { | ||
name = "ghostty-discord-bot"; | ||
buildInputs = rpathLibs ++ [pythonApp.devEnv]; | ||
|
||
nativeBuildInputs = [ | ||
# Python lib | ||
python3 | ||
poetry | ||
] ++ lib.optionals stdenv.isLinux [ | ||
# None yet | ||
]; | ||
|
||
buildInputs = rpathLibs ++ [ pythonApp.devEnv ]; | ||
|
||
# This should be set onto the rpath of the ghostty binary if you want | ||
# it to be "portable" across the system. | ||
LD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs; | ||
DYLD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs; | ||
} | ||
# This should be set onto the rpath of the ghostty binary if you want | ||
# it to be "portable" across the system. | ||
LD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs; | ||
DYLD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs; | ||
} |
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