mirror of
https://github.com/mroi/apple-internals.git
synced 2026-02-12 17:12:44 +00:00
flake: cleanup
This commit is contained in:
14
flake.nix
14
flake.nix
@@ -23,9 +23,11 @@
|
|||||||
xcode = (nixpkgs.legacyPackages.x86_64-darwin.xcodeenv.composeXcodeWrapper {
|
xcode = (nixpkgs.legacyPackages.x86_64-darwin.xcodeenv.composeXcodeWrapper {
|
||||||
version = "15.0.1";
|
version = "15.0.1";
|
||||||
}).overrideAttrs (attrs: { __noChroot = true; });
|
}).overrideAttrs (attrs: { __noChroot = true; });
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
acextract =
|
acextract =
|
||||||
with import nixpkgs { system = "x86_64-darwin"; };
|
with nixpkgs.legacyPackages.x86_64-darwin;
|
||||||
let xcodeHook = makeSetupHook {
|
let xcodeHook = makeSetupHook {
|
||||||
name = "xcode-hook";
|
name = "xcode-hook";
|
||||||
propagatedBuildInputs = [ xcode ];
|
propagatedBuildInputs = [ xcode ];
|
||||||
@@ -34,6 +36,7 @@
|
|||||||
name = "acextract-${lib.substring 0 8 self.inputs.acextract.lastModifiedDate}";
|
name = "acextract-${lib.substring 0 8 self.inputs.acextract.lastModifiedDate}";
|
||||||
src = acextract;
|
src = acextract;
|
||||||
nativeBuildInputs = [ xcodeHook ];
|
nativeBuildInputs = [ xcodeHook ];
|
||||||
|
__noChroot = true;
|
||||||
preBuild = "LD=$CC";
|
preBuild = "LD=$CC";
|
||||||
# FIXME: want to have submodule support for Nix flakes, workaround by explicit instantiation
|
# FIXME: want to have submodule support for Nix flakes, workaround by explicit instantiation
|
||||||
postUnpack = "rmdir source/CommandLine ; ln -s ${command-line} source/CommandLine";
|
postUnpack = "rmdir source/CommandLine ; ln -s ${command-line} source/CommandLine";
|
||||||
@@ -76,17 +79,18 @@
|
|||||||
cp Products/Release/acextract $out/bin/
|
cp Products/Release/acextract $out/bin/
|
||||||
'';
|
'';
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
__noChroot = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dsc-extractor =
|
dsc-extractor =
|
||||||
with import nixpkgs { system = "x86_64-darwin"; };
|
with nixpkgs.legacyPackages.x86_64-darwin;
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "dsc-extractor-${lib.substring 0 8 self.inputs.dsc-extractor.lastModifiedDate}";
|
name = "dsc-extractor-${lib.substring 0 8 self.inputs.dsc-extractor.lastModifiedDate}";
|
||||||
src = dsc-extractor;
|
src = dsc-extractor;
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
};
|
};
|
||||||
|
|
||||||
snap-util =
|
snap-util =
|
||||||
with import nixpkgs { system = "x86_64-darwin"; };
|
with nixpkgs.legacyPackages.x86_64-darwin;
|
||||||
let snapshot-header = fetchFromGitHub {
|
let snapshot-header = fetchFromGitHub {
|
||||||
owner = "apple";
|
owner = "apple";
|
||||||
repo = "darwin-xnu";
|
repo = "darwin-xnu";
|
||||||
@@ -115,6 +119,7 @@
|
|||||||
EOF
|
EOF
|
||||||
chmod a+x $out/bin/snapUtil
|
chmod a+x $out/bin/snapUtil
|
||||||
'';
|
'';
|
||||||
|
__noChroot = true;
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
cat > snapUtil.entitlements <<- EOF
|
cat > snapUtil.entitlements <<- EOF
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
@@ -130,7 +135,6 @@
|
|||||||
EOF
|
EOF
|
||||||
codesign -s - --entitlement snapUtil.entitlements $out/bin/.snapUtil-wrapped
|
codesign -s - --entitlement snapUtil.entitlements $out/bin/.snapUtil-wrapped
|
||||||
'';
|
'';
|
||||||
__noChroot = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user