Skip to content

Commit

Permalink
Merge pull request #17 from Hasnep/add-flake
Browse files Browse the repository at this point in the history
  • Loading branch information
Hasnep authored Nov 29, 2024
2 parents a63c7cf + 8b93bf3 commit 82e4378
Show file tree
Hide file tree
Showing 3 changed files with 243 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
strict_env
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-45871425a44c7fca05e4bce70eb9425db90e42bcb09b41c3bf556360668919d3"
fi
use flake
193 changes: 193 additions & 0 deletions flake.lock

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

45 changes: 45 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
roc.url = "github:roc-lang/roc?rev=0295bb58da3de1dec84f63b5a1847ff32a3fd290";
};

nixConfig = {
extra-trusted-public-keys = "roc-lang.cachix.org-1:6lZeqLP9SadjmUbskJAvcdGR2T5ViR57pDVkxJQb8R4=";
extra-trusted-substituters = "https://roc-lang.cachix.org";
};

outputs =
inputs@{
self,
nixpkgs,
flake-parts,
roc,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
perSystem =
{ inputs', pkgs, ... }:
{
devShells.default = pkgs.mkShell {
name = "roc-html";
packages = [
inputs'.roc.packages.cli
pkgs.fd
pkgs.just
pkgs.nixfmt-rfc-style
pkgs.pre-commit
];
shellHook = "pre-commit install --overwrite";
};
formatter = pkgs.nixfmt-rfc-style;
};
};
}

0 comments on commit 82e4378

Please sign in to comment.