2019-03-05 17:36:40 +00:00
|
|
|
{ stdenv, pkgs, target-os }:
|
2019-02-15 08:04:03 +00:00
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
with stdenv;
|
|
|
|
|
|
|
|
let
|
2019-03-05 17:36:40 +00:00
|
|
|
targetLinux = {
|
|
|
|
"linux" = true;
|
|
|
|
"" = true;
|
|
|
|
}.${target-os} or false;
|
|
|
|
targetWindows = {
|
|
|
|
"windows" = true;
|
|
|
|
"" = true;
|
|
|
|
}.${target-os} or false;
|
2019-02-15 08:04:03 +00:00
|
|
|
windowsPlatform = callPackage ./windows { };
|
|
|
|
appimagekit = callPackage ./appimagekit { };
|
|
|
|
linuxdeployqt = callPackage ./linuxdeployqt { inherit appimagekit; };
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
buildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
file
|
|
|
|
gnupg # Used by appimagetool
|
|
|
|
go
|
2019-03-05 17:36:40 +00:00
|
|
|
] ++ lib.optional targetLinux [ appimagekit linuxdeployqt patchelf ]
|
|
|
|
++ lib.optional (! targetWindows) qt5.full
|
|
|
|
++ lib.optional targetWindows windowsPlatform.buildInputs;
|
|
|
|
shellHook = (if target-os == "windows" then "unset QT_PATH" else ''
|
2019-02-15 08:04:03 +00:00
|
|
|
export QT_PATH="${qt5.full}"
|
|
|
|
export PATH="${stdenv.lib.makeBinPath [ qt5.full ]}:$PATH"
|
2019-03-05 17:36:40 +00:00
|
|
|
'') + (lib.optionalString isDarwin ''
|
|
|
|
export MACOSX_DEPLOYMENT_TARGET=10.9
|
|
|
|
'');
|
2019-02-15 08:04:03 +00:00
|
|
|
}
|