flake: cleanup

This commit is contained in:
Michael Roitzsch
2024-01-17 19:40:03 +01:00
parent 61ff7f899f
commit 093a04de7f

View File

@@ -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;
}; };
}; };
}; };