Skip to content

Commit

Permalink
build(nix): nix environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuwn committed Jun 16, 2024
1 parent 23576fb commit 78f96ad
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ erl_crash.dump
# SQLite
*.sqlite3
*.db

# Nix
result
98 changes: 98 additions & 0 deletions flake.lock

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

35 changes: 35 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
description = "Moe-Counter Compatible Website Hit Counter";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nix-gleam.url = "github:arnarg/nix-gleam";
gitignore = {
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, nix-gleam, gitignore, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
nix-gleam.overlays.default
];
};
inherit (gitignore.lib) gitignoreSource;
in
{
packages.default = pkgs.buildGleamApplication {
src = gitignoreSource ./.;
rebar3Package = pkgs.rebar3WithPlugins {
plugins = with pkgs.beamPackages; [ pc ];
};
};
devShell = pkgs.mkShell {
buildInputs = [ pkgs.gleam pkgs.rebar3 ];
};
}
);
}

0 comments on commit 78f96ad

Please sign in to comment.