2019-05-22 16:04:45 +00:00
|
|
|
{ stdenv, pkgs, callPackage, target-os,
|
2019-06-07 14:37:30 +00:00
|
|
|
cmake, extra-cmake-modules, file, status-go, go,
|
2019-04-01 20:07:39 +00:00
|
|
|
darwin, nodejs }:
|
2019-02-15 08:04:03 +00:00
|
|
|
|
|
|
|
let
|
2019-06-04 16:50:29 +00:00
|
|
|
inherit (stdenv.lib) catAttrs concatStrings optional unique;
|
|
|
|
|
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-06-07 14:37:30 +00:00
|
|
|
windowsPlatform = callPackage ./windows { inherit go; };
|
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 =
|
2019-06-04 16:50:29 +00:00
|
|
|
optional platform.targetLinux linuxPlatform ++
|
|
|
|
optional platform.targetDarwin darwinPlatform ++
|
|
|
|
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
|
|
|
|
2019-06-07 14:37:30 +00:00
|
|
|
in {
|
2019-06-04 16:50:29 +00:00
|
|
|
buildInputs = unique ([
|
2019-06-07 14:37:30 +00:00
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
file
|
|
|
|
snoreNotifySources
|
|
|
|
qtkeychainSources
|
2019-06-04 16:50:29 +00:00
|
|
|
] ++ catAttrs "buildInputs" selectedSources
|
|
|
|
++ (builtins.attrValues nodeInputs));
|
2019-05-22 16:04:45 +00:00
|
|
|
|
2019-06-04 16:50:29 +00:00
|
|
|
shellHook = concatStrings (catAttrs "shellHook" (selectedSources ++ [ snoreNotifySources qtkeychainSources ]));
|
2019-06-07 14:37:30 +00:00
|
|
|
}
|