@@ -169,8 +169,20 @@ deployMobile platform mobileArgs = withProjectRoot "." $ \root -> do
169169 , _keytoolConfig_storepass = "obelisk"
170170 , _keytoolConfig_dname = "CN=mqttserver.ibm.com, OU=ID, O=IBM, L=Hursley, S=Hants, C=GB" -- TODO Read these from config?
171171 }
172− result <- nixBuildAttrWithCache srcDir $ platform <> ".frontend"
173− callProcessAndLogOutput (Notice, Error) $ proc (result </> "bin" </> "deploy") mobileArgs
172+ let releaseKey = renderAttrset $ Map.fromList
173+ [ ("storeFile", NValue_Path keystorePath)
174+ , ("storePassword", NValue_Text "obelisk")
175+ , ("keyAlias", NValue_Text "obelisk")
176+ , ("keyPassword", NValue_Text "obelisk")
177+ ]
178+ result <- nixCmd $ NixCmd_Build $ def
179+ & nixBuildConfig_outLink .~ OutLink_None
180+ & nixCmdConfig_target .~ Target
181+ { _target_path = Nothing
182+ , _target_attr = Nothing
183+ , _target_expr = Just $ "with (import " <> srcDir <> " {}); " <> platform <> ".frontend.override (drv: { releaseKey = (if builtins.isNull drv.releaseKey then {} else drv.releaseKey) // " <> T.unpack releaseKey <> "; })"
184+ }
185+ callProcessAndLogOutput (Notice, Error) $ proc (result </> "bin" </> "deploy") mobileArgs
174186
175187data KeytoolConfig = KeytoolConfig
176188 { _keytoolConfig_keystore :: FilePath