2019-11-29 10:20:08 +00:00
|
|
|
{ stdenv, lib, callPackage, mkShell,
|
2020-04-23 18:19:12 +00:00
|
|
|
gnupg22, darwin, qt5custom, status-go, baseImageFactory }:
|
2019-03-21 16:56:22 +00:00
|
|
|
|
2020-04-23 18:19:12 +00:00
|
|
|
assert lib.assertMsg stdenv.isDarwin "Building MacOS app can work only on MacOS!";
|
2019-05-07 06:43:53 +00:00
|
|
|
|
2019-03-21 16:56:22 +00:00
|
|
|
let
|
2019-11-29 10:20:08 +00:00
|
|
|
inherit (lib) concatStrings catAttrs;
|
2020-04-23 18:19:12 +00:00
|
|
|
inherit (darwin.apple_sdk.frameworks)
|
|
|
|
AppKit Cocoa Foundation OpenGL CoreFoundation;
|
2019-03-21 16:56:22 +00:00
|
|
|
|
2020-04-23 18:19:12 +00:00
|
|
|
baseImage = baseImageFactory "macos";
|
2019-04-03 22:05:59 +00:00
|
|
|
|
2020-04-23 18:19:12 +00:00
|
|
|
in {
|
2019-11-29 10:20:08 +00:00
|
|
|
shell = mkShell {
|
2020-04-23 18:19:12 +00:00
|
|
|
buildInputs = [
|
|
|
|
gnupg22 baseImage qt5custom
|
|
|
|
darwin.cf-private
|
|
|
|
AppKit Cocoa Foundation OpenGL
|
|
|
|
];
|
|
|
|
|
|
|
|
inputsFrom = [
|
|
|
|
status-go baseImage
|
|
|
|
];
|
|
|
|
|
|
|
|
shellHook = ''
|
2019-05-08 15:07:06 +00:00
|
|
|
export NIX_TARGET_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_TARGET_LDFLAGS"
|
2020-04-23 18:19:12 +00:00
|
|
|
export QT_PATH="${qt5custom}"
|
|
|
|
export QT_BASEBIN_PATH="${qt5custom}/bin"
|
|
|
|
export PATH="$QT_BASEBIN_PATH/bin:$PATH"
|
2019-05-08 15:07:06 +00:00
|
|
|
'';
|
2019-11-29 10:20:08 +00:00
|
|
|
};
|
2019-03-21 16:56:22 +00:00
|
|
|
}
|