diff options
| author | Fuwn <[email protected]> | 2024-07-27 19:03:49 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-07-27 19:03:49 -0700 |
| commit | efeff94b550651ab8f134e705b07b80c1c8faeba (patch) | |
| tree | d345d0a0d5602cc01ee164a02a08b07bf97ecfd8 /flake.nix | |
| download | yuna-main.tar.xz yuna-main.zip | |
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c92d0d8 --- /dev/null +++ b/flake.nix @@ -0,0 +1,51 @@ +{ + 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 + ]; + }; + } + ); +} |