2019-05-22 16:04:45 +00:00
|
|
|
{ stdenv, pkgs, callPackage, target-os,
|
2019-05-17 08:55:24 +00:00
|
|
|
cmake, extra-cmake-modules, file, status-go,
|
2019-04-01 20:07:39 +00:00
|
|
|
darwin, nodejs }:
|
2019-02-15 08:04:03 +00:00
|
|
|
|
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-05-08 15:07:06 +00:00
|
|
|
linuxPlatform = callPackage ./linux { inherit status-go; };
|
2019-05-17 08:55:24 +00:00
|
|
|
darwinPlatform = callPackage ./macos { inherit status-go darwin; };
|
2019-02-15 08:04:03 +00:00
|
|
|
windowsPlatform = callPackage ./windows { };
|
2019-05-07 06:43:53 +00:00
|
|
|
snoreNotifySources = callPackage ./cmake/snorenotify { };
|
|
|
|
qtkeychainSources = callPackage ./cmake/qtkeychain { };
|
2019-05-13 09:22:29 +00:00
|
|
|
selectedSources =
|
|
|
|
lib.optional platform.targetLinux linuxPlatform ++
|
|
|
|
lib.optional platform.targetDarwin darwinPlatform ++
|
|
|
|
lib.optional platform.targetWindows windowsPlatform;
|
2019-05-22 16:04:45 +00:00
|
|
|
nodeInputs = import ./realm-node {
|
|
|
|
# The remaining dependencies come from Nixpkgs
|
|
|
|
inherit pkgs nodejs;
|
|
|
|
};
|
2019-02-15 08:04:03 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
buildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
file
|
2019-05-07 06:43:53 +00:00
|
|
|
snoreNotifySources
|
|
|
|
qtkeychainSources
|
2019-05-22 16:04:45 +00:00
|
|
|
] ++ lib.catAttrs "buildInputs" selectedSources
|
|
|
|
++ (builtins.attrValues nodeInputs);
|
|
|
|
|
2019-05-13 09:22:29 +00:00
|
|
|
shellHook = lib.concatStrings (lib.catAttrs "shellHook" (selectedSources ++ [ snoreNotifySources qtkeychainSources ]));
|
2019-02-15 08:04:03 +00:00
|
|
|
}
|