Skip to content

Commit

Permalink
Rewrite flakes.nix to avoid using flake-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Jun 22, 2024
1 parent 381278d commit 846f0c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 48 deletions.
34 changes: 0 additions & 34 deletions flake.lock

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

29 changes: 15 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
description = "Elixir Development Environment";

inputs = {
nixpkgs = { url = "github:NixOS/nixpkgs/nixos-24.05"; };
flake-utils = { url = "github:numtide/flake-utils"; };
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
inherit (pkgs.lib) optional optionals;
outputs = { self, nixpkgs, ... }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
in
with pkgs;
{
devShell = pkgs.mkShell {
buildInputs = [
elixir
] ;
};
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
elixir
];
};
});
};
}

0 comments on commit 846f0c0

Please sign in to comment.