2019-03-05 17:36:40 +00:00
|
|
|
{ stdenv, pkgs, target-os }:
|
2019-02-15 08:04:03 +00:00
|
|
|
|
|
|
|
with pkgs;
|
2019-03-21 16:56:22 +00:00
|
|
|
with stdenv;
|
2019-02-15 08:04:03 +00:00
|
|
|
|
|
|
|
let
|
2019-05-02 18:13:16 +00:00
|
|
|
platform = callPackage ../platform.nix { inherit target-os; };
|
2019-03-21 16:56:22 +00:00
|
|
|
linuxPlatform = callPackage ./linux { };
|
|
|
|
darwinPlatform = callPackage ./macos { };
|
2019-02-15 08:04:03 +00:00
|
|
|
windowsPlatform = callPackage ./windows { };
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
buildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
file
|
2019-05-02 18:13:16 +00:00
|
|
|
] ++ lib.optionals platform.targetLinux linuxPlatform.buildInputs
|
|
|
|
++ lib.optionals platform.targetDarwin darwinPlatform.buildInputs
|
|
|
|
++ lib.optionals platform.targetWindows windowsPlatform.buildInputs
|
|
|
|
++ lib.optional (! platform.targetWindows) qt5.full;
|
|
|
|
shellHook =
|
|
|
|
lib.optionalString (target-os != "windows") ''
|
2019-02-15 08:04:03 +00:00
|
|
|
export QT_PATH="${qt5.full}"
|
2019-04-03 22:05:59 +00:00
|
|
|
export QT_BASEBIN_PATH="${qt5.qtbase.bin}"
|
2019-05-02 18:13:16 +00:00
|
|
|
export PATH="${qt5.full}/bin:$PATH"
|
|
|
|
'' +
|
|
|
|
lib.optionalString platform.targetLinux linuxPlatform.shellHook +
|
|
|
|
lib.optionalString platform.targetDarwin darwinPlatform.shellHook +
|
|
|
|
lib.optionalString platform.targetWindows windowsPlatform.shellHook;
|
2019-02-15 08:04:03 +00:00
|
|
|
}
|