Skip to content

Commit

Permalink
fix: CI (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
togglmichael authored Apr 15, 2024
1 parent 345a712 commit 5172adb
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v19
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
Expand All @@ -31,13 +31,13 @@ jobs:
substituters = https://cache.iog.io https://cache.nixos.org/
- name: Restore cached nix store
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /home/runner/nix
key: ${{ runner.os }}-nix-${{ hashFiles('flake.lock') }}

- name: Restore cached mix deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
Expand Down
34 changes: 34 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 24 additions & 23 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
{
description = "Holidefs: Definition-based national holidays in Elixir";

inputs.nixpkgs.url = "github:NixOS/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs }:
let
elixirOverlay = final: prev: {
elixir-ls = (prev.elixir-ls.override {
elixir = prev.beam.packages.erlangR24.elixir_1_12;
});
};

system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; overlays = [ elixirOverlay ]; };
in {
devShells.${system} = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nil
beam.packages.erlangR24.elixir_1_12
elixir_ls
];
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
elixirOverlay = final: prev: {
elixir-ls = (prev.elixir-ls.override {
elixir = prev.beam.packages.erlangR24.elixir_1_12;
});
};

ci = pkgs.mkShell {
buildInputs = with pkgs; [ beam.packages.erlangR24.elixir_1_12 ];
pkgs = import nixpkgs { inherit system; overlays = [ elixirOverlay ]; };
in {
devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nil
beam.packages.erlangR24.elixir_1_12
elixir_ls
];
};

ci = pkgs.mkShell {
buildInputs = with pkgs; [ beam.packages.erlangR24.elixir_1_12 ];
};
};
};
};
}
);
}

0 comments on commit 5172adb

Please sign in to comment.