Merge remote-tracking branch 'origin/main'
All checks were successful
/ check (push) Successful in 5m18s
All checks were successful
/ check (push) Successful in 5m18s
This commit is contained in:
commit
4f8aea1ef4
7 changed files with 44 additions and 56 deletions
|
@ -454,6 +454,7 @@
|
|||
merge.conflictstyle = "zdiff3";
|
||||
|
||||
push.autoSetupRemote = true;
|
||||
pull.ff = "only";
|
||||
|
||||
branch.autoSetupMerge = true;
|
||||
|
||||
|
|
1
templates/.gitignore
vendored
Normal file
1
templates/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
flake.lock
|
|
@ -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
|
||||
}
|
|
@ -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 @@
|
|||
{
|
||||
forrSelf = 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;
|
||||
};
|
||||
|
||||
forSelf = final: prev: {
|
||||
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;};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,23 +2,23 @@
|
|||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
my-package = let
|
||||
version = "1.0.0";
|
||||
src = ./.;
|
||||
pname = "my-package";
|
||||
in
|
||||
pkgs.beamPackages.mixRelease {
|
||||
inherit pname version src;
|
||||
mixFodDeps = pkgs.beamPackages.fetchMixDeps {
|
||||
inherit version src;
|
||||
pname = "mix-deps-${pname}";
|
||||
hash = pkgs.lib.fakeSha256;
|
||||
};
|
||||
# buildInputs = with pkgs; [];
|
||||
# HOME = "$(pwd)";
|
||||
# MIX_XDG = "$HOME";
|
||||
}: let
|
||||
version = "1.0.0";
|
||||
src = ../.;
|
||||
pname = "my-package";
|
||||
in {
|
||||
${pname} = pkgs.mixRelease {
|
||||
inherit pname version src;
|
||||
mixFodDeps = pkgs.fetchMixDeps {
|
||||
inherit version src;
|
||||
pname = "mix-deps-${pname}";
|
||||
sha256 = pkgs.lib.fakeSha256;
|
||||
};
|
||||
# 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};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue