diff options
| author | Fuwn <[email protected]> | 2024-06-15 23:19:40 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-15 23:19:40 -0700 |
| commit | 78f96ad1b0886cf2b473b8fb848034a1055f3c93 (patch) | |
| tree | 5a5a2bb6641c536fca951dc280c5e78eb7c5ac91 /flake.nix | |
| parent | 23576fb52e052e14d67e7f3d7404792ec7ee2109 (diff) | |
| download | mayu-78f96ad1b0886cf2b473b8fb848034a1055f3c93.tar.xz mayu-78f96ad1b0886cf2b473b8fb848034a1055f3c93.zip | |
build(nix): nix environment
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..6cb146d --- /dev/null +++ b/flake.nix @@ -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 ]; + }; + } + ); +} |