diff options
| author | Fuwn <[email protected]> | 2024-09-28 05:22:56 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-28 05:22:56 -0700 |
| commit | f00ee62bdf66f482c803b2679bbd04dad1bfd1a3 (patch) | |
| tree | 697a410e0d9a98be6bb7ea93a5aa910b911383a3 /flake.nix | |
| parent | d80baa1345c7071727083ff7d0197cb27e53a205 (diff) | |
| download | mayu-f00ee62bdf66f482c803b2679bbd04dad1bfd1a3.tar.xz mayu-f00ee62bdf66f482c803b2679bbd04dad1bfd1a3.zip | |
chore(nix): adjust flake
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 43 |
1 files changed, 33 insertions, 10 deletions
@@ -1,34 +1,57 @@ { 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"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + gitignore = { url = "github:hercules-ci/gitignore.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, flake-utils, nix-gleam, gitignore, ... }: - flake-utils.lib.eachDefaultSystem (system: + + outputs = + { + flake-utils, + gitignore, + nix-gleam, + nixpkgs, + self, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let + inherit (gitignore.lib) gitignoreSource; + 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 ]; + packages = { + default = pkgs.buildGleamApplication { + src = gitignoreSource ./.; + + rebar3Package = pkgs.rebar3WithPlugins { + plugins = with pkgs.beamPackages; [ pc ]; + }; }; + + mayu = self.packages.${system}.default; }; - devShell = pkgs.mkShell { - buildInputs = [ pkgs.gleam pkgs.rebar3 ]; + + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + gleam + rebar3 + ]; }; } ); |