Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build.yml: enable build on aarch64-darwin #152

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:
strategy:
matrix:
arch:
- { name: 'x86_64-linux', runs-on: ubuntu-latest }
- { name: 'x86_64-darwin', runs-on: macos-latest }
- { name: 'aarch64-darwin', runs-on: macos-latest }
name: ${{ matrix.arch.name }}
runs-on: ${{ matrix.arch.runs-on }}
steps:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Supported architectures:

- `x86_64-linux` (Linux and possibly WSL2 on Windows)
- `x86_64-darwin` (macOS)
- `aarch64-darwin` (macOS on Apple Silicon)
- `x86_64-darwin` (macOS on Intel)

Usage
=====
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

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

26 changes: 13 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
let

inherit (nixpkgs) lib;
supportedSystems = [ "x86_64-linux" "x86_64-darwin" ];
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];

pkgsFor = system: import nixpkgs {
inherit system;
Expand Down Expand Up @@ -129,18 +129,18 @@
'';
};

fun4all-env = pkgs.mkShell rec {
buildInputs = with self.packages.${system}; [
fun4all
root
sartre
geant4.data.G4EMLOW
geant4.data.G4ENSDFSTATE
geant4.data.G4ENSDFSTATE
geant4.data.G4PARTICLEXS
geant4.data.G4PhotonEvaporation
];
};
#fun4all-env = pkgs.mkShell rec {
# buildInputs = with self.packages.${system}; [
# fun4all
# root
# sartre
# geant4.data.G4EMLOW
# geant4.data.G4ENSDFSTATE
# geant4.data.G4ENSDFSTATE
# geant4.data.G4PARTICLEXS
# geant4.data.G4PhotonEvaporation
# ];
#};
});

};
Expand Down
20 changes: 11 additions & 9 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ final: prev: with final; {
'';
});

fun4all = callPackage pkgs/fun4all {};
#fun4all = callPackage pkgs/fun4all {};

gaudi = callPackage pkgs/gaudi {
inherit (darwin.apple_sdk.frameworks) Foundation;
Expand All @@ -84,7 +84,7 @@ final: prev: with final; {
];
});

genfit = callPackage pkgs/genfit {};
#genfit = callPackage pkgs/genfit {};

hepmc3 = prev.hepmc3.overrideAttrs (old:
(final.lib.optionalAttrs (final.lib.versionOlder prev.hepmc3.version "3.2.6") rec {
Expand All @@ -108,7 +108,7 @@ final: prev: with final; {

jana2 = callPackage pkgs/jana2 { inherit jana2-src; };

juggler = callPackage pkgs/juggler { inherit juggler-src; };
#juggler = callPackage pkgs/juggler { inherit juggler-src; };

k4FWCore = callPackage pkgs/k4FWCore {};

Expand All @@ -127,24 +127,26 @@ final: prev: with final; {
];
});

root = prev.root.overrideAttrs (prev: {
root = (prev.root.override { tbb = null; }).overrideAttrs (prev: {
cmakeFlags = prev.cmakeFlags ++ [
"-DCMAKE_CXX_STANDARD=20"
"-DCMAKE_BUILD_TYPE=Debug"
"-Dssl=ON" # for Gaudi
"-Dbuiltin_unuran=ON"
"-Dpythia6=ON" # for fun4all
"-Dunuran=ON" # for sartre
"-Droot7=ON" "-Dwebgui=ON" "-Dbuiltin_openui5=ON" # ROOT::ROOTGeomViewer for dd4hep
"-Dbuiltin_glew=ON"
] ++ final.lib.optionals final.stdenv.isDarwin [
# https://github.com/AIDASoft/podio/issues/367
"-Dimt=OFF"
];
NIX_LDFLAGS = lib.optionalString (!stdenv.isDarwin) "--version-script,${./pkgs/root/version.map}";
preConfigure = builtins.replaceStrings [ "rm -rf builtins/*" ] [ "" ] prev.preConfigure;
preConfigure = builtins.replaceStrings [ "rm -rf builtins/*" "for path in builtins/*; do" ] [ "" "for path in ; do" ] prev.preConfigure;
buildInputs = prev.buildInputs ++ [
openssl
pythia6
] ++ final.lib.optionals final.stdenv.isDarwin [
] ++ final.lib.optionals (stdenv.system == "x86_64-darwin") [
memorymappingHook # for roofit/xroofit/src/xRooNLLVar.cxx
];
});
Expand Down Expand Up @@ -197,12 +199,12 @@ final: prev: with final; {

pythia6 = callPackage pkgs/pythia6 {};

rave = callPackage pkgs/rave {};
#rave = callPackage pkgs/rave {};

sartre = callPackage pkgs/sartre {};

veccore = callPackage pkgs/veccore {};
#veccore = callPackage pkgs/veccore {};

vecgeom = callPackage pkgs/vecgeom {};
#vecgeom = callPackage pkgs/vecgeom {};

}
Loading