`pkgs.stdenv.targetPlatform.system` if `pkgs` is available, otherwise use `builtins.currentSystem`