···11+# vmTools {#sec-vm-tools}
22+33+A set of VM related utilities, that help in building some packages in more advanced scenarios.
44+55+## `vmTools.createEmptyImage` {#vm-tools-createEmptyImage}
66+77+A bash script fragment that produces a disk image at `destination`.
88+99+### Attributes
1010+1111+* `size`. The disk size, in MiB.
1212+* `fullName`. Name that will be written to `${destination}/nix-support/full-name`.
1313+* `destination` (optional, default `$out`). Where to write the image files.
1414+1515+## `vmTools.runInLinuxVM` {#vm-tools-runInLinuxVM}
1616+1717+Run a derivation in a Linux virtual machine (using Qemu/KVM).
1818+By default, there is no disk image; the root filesystem is a `tmpfs`, and the Nix store is shared with the host (via the [9P protocol](https://wiki.qemu.org/Documentation/9p#9p_Protocol)).
1919+Thus, any pure Nix derivation should run unmodified.
2020+2121+If the build fails and Nix is run with the `-K/--keep-failed` option, a script `run-vm` will be left behind in the temporary build directory that allows you to boot into the VM and debug it interactively.
2222+2323+### Attributes
2424+2525+* `preVM` (optional). Shell command to be evaluated *before* the VM is started (i.e., on the host).
2626+* `memSize` (optional, default `512`). The memory size of the VM in MiB.
2727+* `diskImage` (optional). A file system image to be attached to `/dev/sda`.
2828+ Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
2929+3030+### Examples
3131+3232+Build the derivation hello inside a VM:
3333+```nix
3434+{ pkgs }: with pkgs; with vmTools;
3535+runInLinuxVM hello
3636+```
3737+3838+Build inside a VM with extra memory:
3939+```nix
4040+{ pkgs }: with pkgs; with vmTools;
4141+runInLinuxVM (hello.overrideAttrs (_: { memSize = 1024; }))
4242+```
4343+4444+Use VM with a disk image (implicitly sets `diskImage`, see [`vmTools.createEmptyImage`](#vm-tools-createEmptyImage)):
4545+```nix
4646+{ pkgs }: with pkgs; with vmTools;
4747+runInLinuxVM (hello.overrideAttrs (_: {
4848+ preVM = createEmptyImage {
4949+ size = 1024;
5050+ fullName = "vm-image";
5151+ };
5252+}))
5353+```
5454+5555+## `vmTools.extractFs` {#vm-tools-extractFs}
5656+5757+Takes a file, such as an ISO, and extracts its contents into the store.
5858+5959+### Attributes
6060+6161+* `file`. Path to the file to be extracted.
6262+ Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
6363+* `fs` (optional). Filesystem of the contents of the file.
6464+6565+### Examples
6666+6767+Extract the contents of an ISO file:
6868+```nix
6969+{ pkgs }: with pkgs; with vmTools;
7070+extractFs { file = ./image.iso; }
7171+```
7272+7373+## `vmTools.extractMTDfs` {#vm-tools-extractMTDfs}
7474+7575+Like [](#vm-tools-extractFs), but it makes use of a [Memory Technology Device (MTD)](https://en.wikipedia.org/wiki/Memory_Technology_Device).
7676+7777+## `vmTools.runInLinuxImage` {#vm-tools-runInLinuxImage}
7878+7979+Like [](#vm-tools-runInLinuxVM), but instead of using `stdenv` from the Nix store, run the build using the tools provided by `/bin`, `/usr/bin`, etc. from the specified filesystem image, which typically is a filesystem containing a [FHS](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard)-based Linux distribution.
8080+8181+## `vmTools.makeImageTestScript` {#vm-tools-makeImageTestScript}
8282+8383+Generate a script that can be used to run an interactive session in the given image.
8484+8585+### Examples
8686+8787+Create a script for running a Fedora 27 VM:
8888+```nix
8989+{ pkgs }: with pkgs; with vmTools;
9090+makeImageTestScript diskImages.fedora27x86_64
9191+```
9292+9393+Create a script for running an Ubuntu 20.04 VM:
9494+```nix
9595+{ pkgs }: with pkgs; with vmTools;
9696+makeImageTestScript diskImages.ubuntu2004x86_64
9797+```
9898+9999+## `vmTools.diskImageFuns` {#vm-tools-diskImageFuns}
100100+101101+A set of functions that build a predefined set of minimal Linux distributions images.
102102+103103+### Images
104104+105105+* Fedora
106106+ * `fedora26x86_64`
107107+ * `fedora27x86_64`
108108+* CentOS
109109+ * `centos6i386`
110110+ * `centos6x86_64`
111111+ * `centos7x86_64`
112112+* Ubuntu
113113+ * `ubuntu1404i386`
114114+ * `ubuntu1404x86_64`
115115+ * `ubuntu1604i386`
116116+ * `ubuntu1604x86_64`
117117+ * `ubuntu1804i386`
118118+ * `ubuntu1804x86_64`
119119+ * `ubuntu2004i386`
120120+ * `ubuntu2004x86_64`
121121+ * `ubuntu2204i386`
122122+ * `ubuntu2204x86_64`
123123+* Debian
124124+ * `debian10i386`
125125+ * `debian10x86_64`
126126+ * `debian11i386`
127127+ * `debian11x86_64`
128128+129129+### Attributes
130130+131131+* `size` (optional, defaults to `4096`). The size of the image, in MiB.
132132+* `extraPackages` (optional). A list names of additional packages from the distribution that should be included in the image.
133133+134134+### Examples
135135+136136+8GiB image containing Firefox in addition to the default packages:
137137+```nix
138138+{ pkgs }: with pkgs; with vmTools;
139139+diskImageFuns.ubuntu2004x86_64 { extraPackages = [ "firefox" ]; size = 8192; }
140140+```
141141+142142+## `vmTools.diskImageExtraFuns` {#vm-tools-diskImageExtraFuns}
143143+144144+Shorthand for `vmTools.diskImageFuns.<attr> { extraPackages = ... }`.
145145+146146+## `vmTools.diskImages` {#vm-tools-diskImages}
147147+148148+Shorthand for `vmTools.diskImageFuns.<attr> { }`.
···334334 [headscale's example configuration](https://github.com/juanfont/headscale/blob/main/config-example.yaml)
335335 can be directly written as attribute-set in Nix within this option.
336336337337+- `services.kubo` now unmounts `ipfsMountDir` and `ipnsMountDir` even if it is killed unexpectedly when 'autoMount` is enabled.
338338+337339- `nixos/lib/make-disk-image.nix` can now mutate EFI variables, run user-provided EFI firmware or variable templates. This is now extensively documented in the NixOS manual.
338340339341- `services.grafana` listens only on localhost by default again. This was changed to upstreams default of `0.0.0.0` by accident in the freeform setting conversion.
···233233 $out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h
234234 '';
235235 });
236236+237237+ System = lib.overrideDerivation super.System (drv: {
238238+ installPhase = drv.installPhase + ''
239239+ # Contrarily to the other frameworks, System framework's TBD file
240240+ # is a symlink pointing to ${MacOSX-SDK}/usr/lib/libSystem.B.tbd.
241241+ # This produces an error when installing the framework as:
242242+ # 1. The original file is not copied into the output directory
243243+ # 2. Even if it was copied, the relative path wouldn't match
244244+ # Thus, it is easier to replace the file than to fix the symlink.
245245+ cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \
246246+ $out/Library/Frameworks/System.framework/Versions/B/System.tbd
247247+ '';
248248+ });
236249 };
237250238251 # Merge extraDeps into generatedDeps.
+2-2
pkgs/os-specific/darwin/raycast/default.nix
···6677stdenvNoCC.mkDerivation rec {
88 pname = "raycast";
99- version = "1.49.2";
99+ version = "1.49.3";
10101111 src = fetchurl {
1212 # https://github.com/NixOS/nixpkgs/pull/223495
···1717 # to host GitHub Actions to periodically check for updates
1818 # and re-release the `.dmg` file to Internet Archive (https://archive.org/details/raycast)
1919 url = "https://archive.org/download/raycast/raycast-${version}.dmg";
2020- sha256 = "sha256-3evuSRSCZkhxRy/85ohzIVF1tKRlWy+G5BOmuCWF2hU=";
2020+ sha256 = "sha256-Irn99/49fRQg73cX8aKZ72D1o+mDPg44Q1pXAMdXrb0=";
2121 };
22222323 dontPatch = true;
···22222323 hardeningDisable = [ "format" ];
24242525+ enableParallelBuilding = true;
2626+2527 # autoreconfHook fails hard if these two files do not exist
2628 postPatch = ''
2729 touch AUTHORS ChangeLog