Skip to content

Commit

Permalink
Add apple sdk libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Jul 26, 2024
1 parent baf89fb commit 51185e5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 14 deletions.
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.

36 changes: 22 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,30 @@

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

outputs = { self, nixpkgs, ... }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
inherit (nixpkgs.lib) optional;
pkgs = import nixpkgs { inherit system; };

sdk = with pkgs;
lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [
# needed for compilation
AppKit
Foundation
CoreFoundation
CoreServices
]);

in {
devShell = pkgs.mkShell {
buildInputs =
[ pkgs.elixir sdk ];
};
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
elixir
];
};
});
};

}

0 comments on commit 51185e5

Please sign in to comment.