Skip to content

Commit

Permalink
Add prebuilt packages for aarch64-darwin (m1) (#579)
Browse files Browse the repository at this point in the history
Now that new GH runners are M1 macs, we need to have suitable libraries
for them as well.
  • Loading branch information
angerman authored Apr 30, 2024
1 parent 4d79604 commit 89387f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
script: |
mkdir __pkgs
echo ${{ github.sha }} > __pkgs/COMMIT_SHA
for sys in msys2 macos debian; do
for sys in msys2 macos x86_64-macos arm64-macos debian; do
for lib in libsodium libsodium-vrf libsecp256k1 libblst; do
out=$(nix build .#dist.$sys.$lib --no-link --print-out-paths -L)
for ext in pkg.tar.zstd pkg deb; do
Expand Down
13 changes: 11 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

pkgs = import nixpkgs { system = "x86_64-linux"; overlays = builtins.attrValues overlays; };
darwin-pkgs = import nixpkgs { system = "x86_64-darwin"; overlays = builtins.attrValues overlays; };
aarch64-darwin-pkgs = import nixpkgs { system = "aarch64-darwin"; overlays = builtins.attrValues overlays; };


# we can use this, to get a coherent picture of the sources for
Expand Down Expand Up @@ -258,19 +259,27 @@
done
'';
};
in {
in rec {
msys2 = {
libsodium-vrf= mkPacmanPkg "/mingw64/opt/cardano" (mkSingleOutput pkgs.pkgsCross.mingwW64.libsodium-vrf);
libsodium = mkPacmanPkg "/mingw64/opt/cardano" (mkSingleOutput pkgs.pkgsCross.mingwW64.libsodium);
libblst = mkPacmanPkg "/mingw64/opt/cardano" (mkSingleOutput pkgs.pkgsCross.mingwW64.libblst);
libsecp256k1 = mkPacmanPkg "/mingw64/opt/cardano" (mkSingleOutput pkgs.pkgsCross.mingwW64.secp256k1);
};
macos = {
x86_64-macos = {
libsodium-vrf= mkDarwinPkg "/usr/local/opt/cardano" (mkSingleOutput darwin-pkgs.libsodium-vrf);
libsodium = mkDarwinPkg "/usr/local/opt/cardano" (mkSingleOutput darwin-pkgs.libsodium);
libblst = mkDarwinPkg "/usr/local/opt/cardano" (mkSingleOutput darwin-pkgs.libblst);
libsecp256k1 = mkDarwinPkg "/usr/local/opt/cardano" (mkSingleOutput darwin-pkgs.secp256k1);
};
arm64-macos = {
libsodium-vrf= mkDarwinPkg "/usr/local/opt/cardano" (mkSingleOutput aarch64-darwin-pkgs.libsodium-vrf);
libsodium = mkDarwinPkg "/usr/local/opt/cardano" (mkSingleOutput aarch64-darwin-pkgs.libsodium);
libblst = mkDarwinPkg "/usr/local/opt/cardano" (mkSingleOutput aarch64-darwin-pkgs.libblst);
libsecp256k1 = mkDarwinPkg "/usr/local/opt/cardano" (mkSingleOutput aarch64-darwin-pkgs.secp256k1);
};
# legacy mapping. macos used to be what is x86_64-macos now.
macos = x86_64-macos;
debian = {
libsodium-vrf= mkDebianPkg "/usr/local/opt/cardano" (mkSingleOutput pkgs.libsodium-vrf);
libsodium = mkDebianPkg "/usr/local/opt/cardano" (mkSingleOutput pkgs.libsodium);
Expand Down

0 comments on commit 89387f0

Please sign in to comment.