From 6949a664b7b45f21d3ee5aa1ce82a80cf02f66e1 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Thu, 5 Nov 2020 21:19:56 +0100 Subject: [PATCH] flake: add dyld-shared-cache-util --- README.md | 3 +++ flake.nix | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a60c56f..4391137 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ following externally hosted tools: [**acextract**](https://github.com/bartoszj/acextract) Unpacks asset catalogs to individual files. +[**dyld-shared-cache-util**](https://github.com/antons/dyld-shared-cache-big-sur) +Extracts dynamic libraries from the dyld linker cache. + [**snapUtil**](https://github.com/ahl/apfs) Manages APFS snapshots. diff --git a/flake.nix b/flake.nix index 6c733fd..c37aa07 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,10 @@ url = github:iHTCboy/CommandLine; flake = false; }; + dyld-shared-cache = { + url = github:antons/dyld-shared-cache-big-sur; + flake = false; + }; snapshot-header = { url = "https://opensource.apple.com/tarballs/xnu/xnu-6153.141.1.tar.gz"; flake = false; @@ -18,7 +22,7 @@ flake = false; }; }; - outputs = { self, nixpkgs, acextract, command-line, snapshot-header, snap-util }: { + outputs = { self, nixpkgs, acextract, command-line, dyld-shared-cache, snapshot-header, snap-util }: { acextract = with import nixpkgs { system = "x86_64-darwin"; }; let xcode12 = makeSetupHook { @@ -37,6 +41,22 @@ ''; dontStrip = true; }; + dyld-shared-cache = + with import nixpkgs { system = "x86_64-darwin"; }; + stdenv.mkDerivation { + name = "dyld-shared-cache-util-${lib.substring 0 8 self.inputs.dyld-shared-cache.lastModifiedDate}"; + src = dyld-shared-cache; + nativeBuildInputs = [ xcbuildHook ]; + xcbuildFlags = [ + "-scheme dyld_shared_cache_util" + "-configuration Release" + "GCC_PREPROCESSOR_DEFINITIONS=CC_DIGEST_DEPRECATION_WARNING=\\\"\\\"" + ]; + installPhase = '' + mkdir -p $out/bin + cp Products/Release/{dsc_extractor.bundle,dyld_shared_cache_util} $out/bin/ + ''; + }; snap-util = with import nixpkgs { system = "x86_64-darwin"; }; stdenv.mkDerivation {