patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob 974416441acaf2286efaabdfdbd8c638c11f1eee 965 bytes (raw)
name: vm/app/firefox.nix 	 # note: path name is non-authoritative(*)

 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
 
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>

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

import ../make-vm.nix { inherit config; } {
  providers.net = [ "netvm" ];
  run = config.pkgs.callPackage (
    { writeScript }:
    writeScript "run-as-root" ''
      #!/bin/sh
      /bin/sh
    ''
  ) { };

    run-as-user = config.pkgs.callPackage (
    { writeScript, socat, waypipe, havoc, firefox-wayland}:
    writeScript "run-firefox" ''
      #!/bin/sh
      mkdir /run/home/user/0
      export XDG_RUNTIME_DIR=/run/home/user/0
      ${socat}/bin/socat  unix-listen:/run/home/user/waypipe.sock,reuseaddr,fork vsock-connect:2:5000 &
      sleep 1
      ${waypipe}/bin/waypipe --display wayland-local-user --socket /run/home/user/waypipe.sock server -- sleep inf &
      export WAYLAND_DISPLAY=wayland-local-user

      ${firefox-wayland}/bin/firefox https://spectrum-os.org/
      /bin/sh
    ''
  ) { };
}

debug log:

solving 9744164 ...
found 9744164 in https://inbox.spectrum-os.org/spectrum-devel/20221204224506.1801177-2-vadim.likholetov@unikie.com/

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20221204224506.1801177-2-vadim.likholetov@unikie.com/
diff --git a/vm/app/firefox.nix b/vm/app/firefox.nix
new file mode 100644
index 0000000..9744164

Checking patch vm/app/firefox.nix...
Applied patch vm/app/firefox.nix cleanly.

index at:
100644 974416441acaf2286efaabdfdbd8c638c11f1eee	vm/app/firefox.nix

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).