patches and low-level development discussion
 help / color / mirror / code / Atom feed
9427ca4897878fcdaa57ed891da98b8f9c6ce7c4 blob 1429 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>

{ config ? import ../../../../nix/eval-config.nix {} }:

import ../../make-vm.nix { inherit config; } {
  providers.net = [ "netvm" ];
  sharedDirs.virtiofs0.path = "/ext";
  run = config.pkgs.pkgsStatic.callPackage (
    { lib, runCommand, writeScript, nix }:
    let
      inherit (lib) concatStringsSep const hasSuffix makeBinPath;

      bin = builtins.filterSource (name: _type:
        name == toString bin/. || name == toString bin/vm-rebuild) ./.;

      nixPath = [
        "nixpkgs=https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz"
        "spectrum=/run/virtiofs/virtiofs0/vm-config/spectrum"
        "spectrum-vms=/run/virtiofs/virtiofs0/vm-config/vms.nix"
      ];

      resolve_in_root = import ../../../tools/resolve_in_root {
        config = config // { pkgs = config.pkgs.pkgsStatic; };
      };
    in
    writeScript "run-nix" '' 
      #!/bin/execlineb -P
      importas -i PATH PATH
      export NIX_CONFIG "build-users-group ="
      export NIX_REMOTE /run/virtiofs/virtiofs0
      export NIX_PATH ${concatStringsSep ":" nixPath}
      export PATH ${makeBinPath [ bin nix resolve_in_root ]}:''${PATH}
      export XDG_CACHE_HOME /run/cache

      # FIXME: can be removed when we have nix#7070.
      export XDG_DATA_HOME /run/data

      if { /etc/mdev/wait virtiofs0 }
      /bin/sh -il
    ''
  ) { };
}
debug log:

solving 9427ca4 ...
found 9427ca4 in https://spectrum-os.org/lists/archives/spectrum-devel/20221010232909.1953738-20-hi@alyssa.is/

applying [1/1] https://spectrum-os.org/lists/archives/spectrum-devel/20221010232909.1953738-20-hi@alyssa.is/
diff --git a/vm/app/nix/default.nix b/vm/app/nix/default.nix
new file mode 100644
index 0000000..9427ca4

1:33: trailing whitespace.
    writeScript "run-nix" '' 
Checking patch vm/app/nix/default.nix...
Applied patch vm/app/nix/default.nix cleanly.
warning: 1 line adds whitespace errors.

index at:
100644 9427ca4897878fcdaa57ed891da98b8f9c6ce7c4	vm/app/nix/default.nix

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).