This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
bdfr-browser/flake.nix

48 lines
1.3 KiB
Nix
Raw Normal View History

2023-05-17 22:13:55 +00:00
{
description = "bdfr-browser development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "aarch64-darwin" "x86_64-linux" "aarch64-linux" ];
perSystem = { pkgs, lib, self', ... }:
let
pname = "bdfr-browser";
version = "0.0.1";
erlang = pkgs.beam.interpreters.erlangR25;
beamPackages = pkgs.beam.packagesWith erlang;
elixir = beamPackages.elixir_1_14;
inherit (pkgs.stdenv) isDarwin;
in
{
devShells.default = pkgs.mkShell {
packages = (with pkgs; [
erlang
elixir
beamPackages.elixir-ls
mix2nix
]) ++ lib.optionals isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
CoreFoundation
CoreServices
]);
ERL_INCLUDE_PATH = "${erlang}/lib/erlang/usr/include";
};
packages.default = beamPackages.mixRelease {
inherit pname version;
src = ./.;
mixNixDeps = import ./mix.nix { inherit lib beamPackages; };
};
};
};
}