Merge remote-tracking branch 'origin/main'
All checks were successful
/ check (push) Successful in 5m18s

This commit is contained in:
Daniel Flanagan 2024-12-20 10:19:41 -06:00
commit 4f8aea1ef4
7 changed files with 44 additions and 56 deletions

View file

@ -454,6 +454,7 @@
merge.conflictstyle = "zdiff3"; merge.conflictstyle = "zdiff3";
push.autoSetupRemote = true; push.autoSetupRemote = true;
pull.ff = "only";
branch.autoSetupMerge = true; branch.autoSetupMerge = true;

1
templates/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
flake.lock

View file

@ -1,27 +0,0 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1734435836,
"narHash": "sha256-kMBQ5PRiFLagltK0sH+08aiNt3zGERC2297iB6vrvlU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4989a246d7a390a859852baddb1013f825435cee",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,6 +1,8 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = inputs: let outputs = inputs: let
@ -8,6 +10,7 @@
in { in {
overlays = import nix/overlays.nix; overlays = import nix/overlays.nix;
packages = call (import nix/packages.nix); packages = call (import nix/packages.nix);
checks = call (import nix/checks.nix);
devShells = call (import nix/shells.nix); devShells = call (import nix/shells.nix);
}; };
} }

View 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;
};
};
}

View file

@ -1,16 +1,9 @@
{ {
forrSelf = final: prev: { forSelf = final: prev: {
erlangPackages = prev.beam.packagesWith prev.erlang_28; erlang = prev.beam.packagesWith prev.beam.interpreters.erlang_27;
erlang = final.erlangPackages.erlang; elixir = final.erlang.elixir_1_18;
elixir = final.erlangPackages.elixir_1_17; mixRelease = final.erlang.mixRelease.override {elixir = final.elixir;};
fetchMixDeps = final.erlang.fetchMixDeps.override {elixir = final.elixir;};
mixRelease = final.erlangPackages.mixRelease.override {
elixir = final.elixir;
};
fetchMixDeps = final.erlangPackages.fetchMixDeps.override {
elixir = final.elixir;
};
elixir-ls = prev.elixir-ls.override {elixir = final.elixir;}; elixir-ls = prev.elixir-ls.override {elixir = final.elixir;};
}; };
} }

View file

@ -2,23 +2,23 @@
pkgs, pkgs,
self, self,
... ...
}: { }: let
my-package = let version = "1.0.0";
version = "1.0.0"; src = ../.;
src = ./.; pname = "my-package";
pname = "my-package"; in {
in ${pname} = pkgs.mixRelease {
pkgs.beamPackages.mixRelease { inherit pname version src;
inherit pname version src; mixFodDeps = pkgs.fetchMixDeps {
mixFodDeps = pkgs.beamPackages.fetchMixDeps { inherit version src;
inherit version src; pname = "mix-deps-${pname}";
pname = "mix-deps-${pname}"; sha256 = pkgs.lib.fakeSha256;
hash = pkgs.lib.fakeSha256;
};
# buildInputs = with pkgs; [];
# HOME = "$(pwd)";
# MIX_XDG = "$HOME";
}; };
# buildInputs = with pkgs; [];
# HOME = "$(pwd)";
# MIX_XDG = "$HOME";
# RELEASE_COOKIE = "test-cookie";
};
default = self.packages.${pkgs.system}.my-package; default = self.packages.${pkgs.system}.${pname};
} }