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

Add a nix flake #335

Merged
merged 2 commits into from
Jun 25, 2022
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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ insert_final_newline = false
charset = utf-8
trim_trailing_whitespace = true

[*.nix]
charset = utf-8
indent_size = 2

[.gitignore]
end_of_line = lf
insert_final_newline = false
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ Cargo.lock

# Local testdrive environments, mainly for development
testdrive/custom
testdrive/assert
testdrive/assert

# Nix build results
result
94 changes: 94 additions & 0 deletions flake.lock

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

24 changes: 24 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
inputs = {
crane.url = "github:ipetkov/crane";
utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
crane,
utils,
...
}: let
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux"];
in
utils.lib.eachSystem supportedSystems
(
system: {
packages.oura = crane.lib.${system}.buildPackage {
src = self;
};
packages.default = self.packages.${system}.oura;
}
);
}