Skip to content
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
39 changes: 20 additions & 19 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
*rs text eol=lf
*md text eol=lf
*txt text eol=lf
*yaml text eol=lf
*yml text eol=lf
*toml text eol=lf
*are binary
*bam binary
*bcs binary
*cre binary
*itm binary
*png binary
*pro binary
*spl binary
*sto binary
*vvc binary
*wav binary
*wbm binary
*wed binary
*.md text eol=lf
*.rs text eol=lf
*.toml text eol=lf
*.txt text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.are binary
*.bam binary
*.bcs binary
*.cre binary
*.itm binary
*.png binary
*.pro binary
*.spl binary
*.sto binary
*.svg binary
*.vvc binary
*.wav binary
*.wbm binary
*.wed binary
6 changes: 3 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
- name: cache
uses: nix-community/cache-nix-action@v7
with:
primary-key: nix-${{ runner.os }}-pre-${{ hashFiles('flake.nix', 'flake.lock') }}
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.nix', 'flake.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
gc-max-store-size-linux: 1G
gc-max-store-size-linux: 5G
- name: pre-commit
shell: 'nix develop -c bash -e {0}'
run: hk run pre-commit --all -j 10
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.nix', 'flake.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
gc-max-store-size-linux: 1G
gc-max-store-size-linux: 5G
- run: nix build
- name: Archive release artifacts
uses: actions/upload-artifact@main
Expand Down
2 changes: 1 addition & 1 deletion docs/rust.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 71 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 43 additions & 31 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,50 +1,62 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
hk = {
url = "github:jdx/hk/v1.44.2";
};
};

outputs = { self, nixpkgs }:
outputs =
{
self,
nixpkgs,
hk,
}:
let
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forEachSystem = f: nixpkgs.lib.genAttrs systems (system: f system);
pkgsFor = nixpkgs.legacyPackages;
in {
devShells = forEachSystem (system:
in
{
devShells = forEachSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
overrides = (builtins.fromTOML (builtins.readFile ./rust-toolchain.toml));
remote = builtins.fetchTarball {
url = "https://github.com/jdx/hk/archive/refs/tags/v1.44.2.tar.gz";
sha256 = "0a045ixfkj79f9nkiw598vraifv1dj744c6wjxbfaz478xli37rw";
};
hk = pkgs.callPackage (remote + "/default.nix") { };
in {
in
{
default =
with pkgs;
mkShell rec {
nativeBuildInputs = [
cargo
clippy
hk
codespell
git
pkg-config
rust-analyzer
rustc
rustfmt
yamlfmt
];
buildInputs = [
openssl
];
env.HK_PKL_BACKEND = "pklr";
env.OCAMLRUNPARAM = "s=16M,o=500,O=1000000";
env.RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
env.RUSTC_VERSION = overrides.toolchain.channel;
nativeBuildInputs = [
cargo
clippy
hk.packages.${system}.default
nixfmt
codespell
git
pkg-config
rust-analyzer
rustc
rustfmt
yamlfmt
];
buildInputs = [
openssl
];
env.HK_PKL_BACKEND = "pklr";
env.OCAMLRUNPARAM = "s=16M,o=500,O=1000000";
env.RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
env.RUSTC_VERSION = overrides.toolchain.channel;
};
});
}
);
packages = forEachSystem (system: {
default = pkgsFor.${system}.callPackage ./default.nix { };
});
formatter = forEachSystem (system: nixpkgs.${system}.nixfmt);
};
}
Loading
Loading