Skip to content

Commit bbe357f

Browse files
committed
test build time with xcp
1 parent 51994df commit bbe357f

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

disko-install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ main() {
235235
if [[ ! -d "${mountPoint}/nix/store" ]]; then
236236
echo "Copying store paths" >&2
237237
mkdir -p "${mountPoint}/nix/store"
238-
xargs cp --recursive --target "${mountPoint}/nix/store" < "${closure_info}/store-paths"
238+
xargs xcp --recursive --target-directory "${mountPoint}/nix/store" < "${closure_info}/store-paths"
239239
echo "Loading nix database" >&2
240240
NIX_STATE_DIR=${mountPoint}/nix/var/nix nix-store --load-db < "${closure_info}/registration"
241241
fi

package.nix

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
{ stdenvNoCC, makeWrapper, lib, path, nix, coreutils, nixos-install-tools }:
1+
{ stdenvNoCC, makeWrapper, lib, path, nix, coreutils, nixos-install-tools, fetchpatch, xcp }:
22

3+
let
4+
xcp' = xcp.overrideAttrs (old: {
5+
# https://github.com/tarka/xcp/pull/56
6+
patches = (old.patches or []) ++ [
7+
(fetchpatch {
8+
url = "https://github.com/tarka/xcp/commit/8c00cef85c4ae6ffa4f49a59e5f64f68f6407000.patch";
9+
sha256 = "sha256-pwgtA/36YPRtpn4jmOcb44xjiDfEKmpXdJDSvqfGQuk=";
10+
})
11+
];
12+
});
13+
in
314
stdenvNoCC.mkDerivation (finalAttrs: {
415
name = "disko";
516
src = ./.;
@@ -14,7 +25,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
1425
sed -e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" "$i" > "$out/bin/$i"
1526
chmod 755 "$out/bin/$i"
1627
wrapProgram "$out/bin/$i" \
17-
--prefix PATH : ${lib.makeBinPath [ nix coreutils nixos-install-tools ]} \
28+
--prefix PATH : ${lib.makeBinPath [ nix coreutils nixos-install-tools xcp' ]} \
1829
--prefix NIX_PATH : "nixpkgs=${path}"
1930
done
2031
'';

0 commit comments

Comments
 (0)