flake: load snapshot-header the non-flake way

it’s a fixed version that does not participate in 'nix flake update'
This commit is contained in:
Michael Roitzsch
2024-01-17 19:39:49 +01:00
parent b5166d34f4
commit 61ff7f899f
2 changed files with 9 additions and 20 deletions

15
flake.lock generated
View File

@@ -68,8 +68,7 @@
"command-line": "command-line",
"dsc-extractor": "dsc-extractor",
"nixpkgs": "nixpkgs",
"snap-util": "snap-util",
"snapshot-header": "snapshot-header"
"snap-util": "snap-util"
}
},
"snap-util": {
@@ -87,18 +86,6 @@
"repo": "apfs",
"type": "github"
}
},
"snapshot-header": {
"flake": false,
"locked": {
"narHash": "sha256-/2aR6n5CbUobwbxkrGqBOAhCZLwDdIsoIOcpALhAUF8=",
"type": "tarball",
"url": "https://github.com/apple/darwin-xnu/archive/refs/tags/xnu-6153.141.1.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/apple/darwin-xnu/archive/refs/tags/xnu-6153.141.1.tar.gz"
}
}
},
"root": "root",

View File

@@ -13,16 +13,12 @@
url = "github:keith/dyld-shared-cache-extractor";
flake = false;
};
snapshot-header = {
url = "https://github.com/apple/darwin-xnu/archive/refs/tags/xnu-6153.141.1.tar.gz";
flake = false;
};
snap-util = {
url = "github:ahl/apfs";
flake = false;
};
};
outputs = { self, nixpkgs, acextract, command-line, dsc-extractor, snapshot-header, snap-util }: {
outputs = { self, nixpkgs, acextract, command-line, dsc-extractor, snap-util }: {
packages.x86_64-darwin = let
xcode = (nixpkgs.legacyPackages.x86_64-darwin.xcodeenv.composeXcodeWrapper {
version = "15.0.1";
@@ -91,7 +87,13 @@
};
snap-util =
with import nixpkgs { system = "x86_64-darwin"; };
stdenv.mkDerivation {
let snapshot-header = fetchFromGitHub {
owner = "apple";
repo = "darwin-xnu";
rev = "xnu-6153.141.1";
hash = "sha256-/2aR6n5CbUobwbxkrGqBOAhCZLwDdIsoIOcpALhAUF8=";
};
in stdenv.mkDerivation {
name = "snap-util-${lib.substring 0 8 self.inputs.snap-util.lastModifiedDate}";
src = snap-util;
nativeBuildInputs = [ xcode ];