This commit is contained in:
parent
ebfe621f4c
commit
df79b8dc4a
4 changed files with 29 additions and 15 deletions
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
git-hooks.url = "github:cachix/git-hooks.nix";
|
||||
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs: let
|
||||
|
@ -8,6 +10,7 @@
|
|||
in {
|
||||
overlays = import nix/overlays.nix;
|
||||
packages = call (import nix/packages.nix);
|
||||
checks = call (import nix/checks.nix);
|
||||
devShells = call (import nix/shells.nix);
|
||||
};
|
||||
}
|
||||
|
|
17
templates/elixir/nix/checks.nix
Normal file
17
templates/elixir/nix/checks.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
git-hooks,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
git-hooks = git-hooks.lib.${pkgs.system}.run {
|
||||
src = ./..;
|
||||
hooks = {
|
||||
alejandra.enable = true;
|
||||
convco.enable = true;
|
||||
credo.enable = true;
|
||||
dialyzer.enable = true;
|
||||
mix-format.enable = true;
|
||||
mix-test.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,16 +1,9 @@
|
|||
{
|
||||
forSelf = final: prev: {
|
||||
erlangPackages = prev.beam.packagesWith prev.erlang_28;
|
||||
erlang = final.erlangPackages.erlang;
|
||||
elixir = final.erlangPackages.elixir_1_17;
|
||||
|
||||
mixRelease = final.erlangPackages.mixRelease.override {
|
||||
elixir = final.elixir;
|
||||
};
|
||||
fetchMixDeps = final.erlangPackages.fetchMixDeps.override {
|
||||
elixir = final.elixir;
|
||||
};
|
||||
|
||||
erlang = prev.beam.packagesWith prev.beam.interpreters.erlang_27;
|
||||
elixir = final.erlang.elixir_1_18;
|
||||
mixRelease = final.erlang.mixRelease.override {elixir = final.elixir;};
|
||||
fetchMixDeps = final.erlang.fetchMixDeps.override {elixir = final.elixir;};
|
||||
elixir-ls = prev.elixir-ls.override {elixir = final.elixir;};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,19 +4,20 @@
|
|||
...
|
||||
}: let
|
||||
version = "1.0.0";
|
||||
src = ./.;
|
||||
src = ../.;
|
||||
pname = "my-package";
|
||||
in {
|
||||
${pname} = pkgs.beamPackages.mixRelease {
|
||||
${pname} = pkgs.mixRelease {
|
||||
inherit pname version src;
|
||||
mixFodDeps = pkgs.beamPackages.fetchMixDeps {
|
||||
mixFodDeps = pkgs.fetchMixDeps {
|
||||
inherit version src;
|
||||
pname = "mix-deps-${pname}";
|
||||
hash = pkgs.lib.fakeSha256;
|
||||
sha256 = pkgs.lib.fakeSha256;
|
||||
};
|
||||
# buildInputs = with pkgs; [];
|
||||
# HOME = "$(pwd)";
|
||||
# MIX_XDG = "$HOME";
|
||||
# RELEASE_COOKIE = "test-cookie";
|
||||
};
|
||||
|
||||
default = self.packages.${pkgs.system}.${pname};
|
||||
|
|
Loading…
Reference in a new issue