Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 58 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 testers, 6}: 7 8let 9 privateFrameworks = "/Library/Apple/System/Library/PrivateFrameworks"; 10in 11stdenv.mkDerivation (finalAttrs: { 12 pname = "ios-deploy"; 13 version = "1.12.2"; 14 15 src = fetchFromGitHub { 16 owner = "ios-control"; 17 repo = "ios-deploy"; 18 rev = finalAttrs.version; 19 hash = "sha256-TVGC+f+1ow3b93CK3PhIL70le5SZxxb2ug5OkIg8XCA="; 20 }; 21 22 buildPhase = '' 23 runHook preBuild 24 25 awk '{ print "\""$0"\\n\""}' src/scripts/lldb.py >> src/ios-deploy/lldb.py.h 26 clang src/ios-deploy/ios-deploy.m \ 27 -framework Foundation \ 28 -F${privateFrameworks} -framework MobileDevice \ 29 -o ios-deploy 30 31 runHook postBuild 32 ''; 33 34 installPhase = '' 35 runHook preInstall 36 37 install -Dm755 ios-deploy $out/bin/ios-deploy 38 39 runHook postInstall 40 ''; 41 42 __impureHostDeps = [ 43 privateFrameworks 44 ]; 45 46 passthru.tests.version = testers.testVersion { 47 package = finalAttrs.finalPackage; 48 }; 49 50 meta = { 51 description = "Install and debug iPhone apps from the command line, without using Xcode"; 52 homepage = "https://github.com/ios-control/ios-deploy"; 53 license = lib.licenses.gpl3Plus; 54 mainProgram = "ios-deploy"; 55 maintainers = with lib.maintainers; [ wegank ]; 56 platforms = lib.platforms.darwin; 57 }; 58})