Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the nix stuff work reliably #70

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cargo clippy --all-targets --all-features -- -D warnings && cargo +nightly fmt && npx lint-staged
npx lint-staged
8 changes: 6 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@

# We get your default shell to make sure things feel familiar in the dev shell.
getUserShellCommand = if pkgs.stdenv.hostPlatform.isDarwin then
"dscl . -read ~ UserShell | cut -d ' ' -f2"
"dscl . -read ~ UserShell | cut -d ' ' -f2 | tr -d '\n'"
else
"getent passwd $USER | cut -d ':' -f7";
"getent passwd $USER | cut -d ':' -f7 | tr -d '\n'";
in {
packages = {
inherit all;
Expand All @@ -98,6 +98,10 @@
devShells.ci = craneLib.devShell {
LLVM_SYS_180_PREFIX = "${pkgs.lib.getDev pkgs.llvmPackages_18.libllvm}";
inputsFrom = lib.attrValues llvmToCairo;

packages = [
pkgs.nodejs_22
];
};
}
);
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
"lint-staged": {
"(*.md|*.toml|*.json|*.yaml|*.yml|*.css|*.js|*.ts)": [
"prettier --write"
],
"*.rs": [
"rustfmt --unstable-features --edition 2021",
"clippy-driver"
]
},
"husky": {
"hooks": {
"pre-commit": "npx lint-staged && cargo clippy -- -D warnings"
"pre-commit": "npx lint-staged"
}
},
"scripts": {
Expand Down
Loading