-
-
Save dmjio/529027c1f98a98ad9944f07c2ac461f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import (builtins.fetchTarball { | |
sha256 = "068v9xh7d8klk62p2qwr76fyfqfh1bp08xc12x138g5q6pg6yfzb"; | |
url = "https://github.com/nixos/nixpkgs/archive/4507926b80c6b8f73053775ffee17f6781c7e7c8.tar.gz"; | |
}) { inherit config; } | |
, config ? { allowUnfree = true; } | |
, arm ? false | |
}: | |
let | |
pkg = | |
if arm | |
then pkgs.pkgsCross.iphone64.haskell.packages.ghc843.callPackage ./pkg.nix {} | |
else pkgs.haskellPackages.callPackage ./pkg.nix {}; | |
app = pkg.overrideAttrs (drv: { | |
preBuild = '' | |
export NIX_CFLAGS_COMPILE="-framework Foundation -framework UIKit $NIX_CFLAGS_COMPILE" | |
''; | |
buildInputs = | |
["${pkgs.darwin.xcode}/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System"] ++ | |
drv.buildInputs; | |
}); | |
script = pkgs.writeScriptBin "script" '' | |
${pkgs.nodePackages.ios-deploy}/bin/ios-deploy -d -W -b app.app | |
''; | |
in | |
{ | |
inherit script; | |
inherit app; | |
inherit (pkgs.nodePackages) ios-deploy; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment