aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-28 05:22:56 -0700
committerFuwn <[email protected]>2024-09-28 05:22:56 -0700
commitf00ee62bdf66f482c803b2679bbd04dad1bfd1a3 (patch)
tree697a410e0d9a98be6bb7ea93a5aa910b911383a3 /flake.nix
parentd80baa1345c7071727083ff7d0197cb27e53a205 (diff)
downloadmayu-f00ee62bdf66f482c803b2679bbd04dad1bfd1a3.tar.xz
mayu-f00ee62bdf66f482c803b2679bbd04dad1bfd1a3.zip
chore(nix): adjust flake
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix43
1 files changed, 33 insertions, 10 deletions
diff --git a/flake.nix b/flake.nix
index 6cb146d..b2a66a7 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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
+ ];
};
}
);