Skip to content

Commit

Permalink
Add flake
Browse files Browse the repository at this point in the history
  • Loading branch information
Hasnep committed Nov 28, 2024
1 parent a63c7cf commit 01dd086
Show file tree
Hide file tree
Showing 3 changed files with 242 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
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=b7c2cb084e15a56320e652ad3c77fdb8262bc1a4";
};

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 01dd086

Please sign in to comment.