···5 version,
67 autoPatchelfHook,
8+ flutter,
9 gtkmm3,
10 keybinder3,
11 lib,
···15 protoc-gen-dart,
16 qt6,
17}:
18+flutter.buildFlutterApplication {
19 inherit version;
20 pname = "multipass-gui";
21 src = multipass_src;
···25 pubspecLock = lib.importJSON ./pubspec.lock.json;
2627 gitHashes = {
28+ dartssh2 = "sha256-9XrxxOamy0uS7kUz6mwWwp4yIBHLX/GSoyxMk/Wwa+4=";
29 hotkey_manager_linux = "sha256-aO0h94YZvgV/ggVupNw8GjyZsnXrq3qTHRDtuhNv3oI=";
30+ tray_menu = "sha256-TAlRW7VkZWAoHAVlrPeDqS3BsqhQTyCekYQ2b4AEqjU=";
31 window_size = "sha256-71PqQzf+qY23hTJvcm0Oye8tng3Asr42E2vfF1nBmVA=";
32 xterm = "sha256-h8vIonTPUVnNqZPk/A4ZV7EYCMyM0rrErL9ZOMe4ZBE=";
33 };
···49 ];
5051 preBuild = ''
52+ # Temporary fix which can be removed in the next release.
53+ # Already addressed upstream, but part of a larger patch
54+ # that did not trivially apply.
55+ substituteInPlace lib/main.dart --replace-fail 'TabBarTheme(' 'TabBarThemeData('
56+57 mkdir -p lib/generated
5859 # Generate the Dart gRPC code for the Multipass GUI.
+4-17
pkgs/by-name/mu/multipass/multipassd.nix
···6 cmake,
7 dnsmasq,
8 fetchFromGitHub,
09 git,
010 gtest,
11 iproute2,
12 iptables,
···27 xterm,
28}:
2930-let
31- # This is done here because a CMakeLists.txt from one of it's submodules tries
32- # to modify a file, so we grab the source for the submodule here, copy it into
33- # the source of the Multipass project which allows the modification to happen.
34- grpc_src = fetchFromGitHub {
35- owner = "canonical";
36- repo = "grpc";
37- rev = "ba8e7f72a57b9e0b25783a4d3cea58c79379f194";
38- hash = "sha256-DS1UNLCUdbipn5w4p2aVa8LgHHhdJiAfzfEdIXNO69o=";
39- fetchSubmodules = true;
40- };
41-in
42stdenv.mkDerivation {
43 inherit version;
44 pname = "multipassd";
···54 # in the Nix build environment. This patch disables the fetch in favour of providing
55 # the googletest library from nixpkgs.
56 ./cmake_no_fetch.patch
57- # Ensures '-Wno-ignored-attributes' is supported by the compiler before attempting to build.
58- ./cmake_warning.patch
59 # As of Multipass 1.14.0, the upstream started using vcpkg for grabbing C++ dependencies,
60 # which doesn't work in the nix build environment. This patch reverts that change, in favour
61 # of providing those dependencies manually in this derivation.
···83 --replace-fail "OVMF.fd" "${OVMF.fd}/FV/OVMF.fd" \
84 --replace-fail "QEMU_EFI.fd" "${OVMF.fd}/FV/QEMU_EFI.fd"
8586- # Copy the grpc submodule we fetched into the source code.
87- cp -r --no-preserve=mode ${grpc_src} 3rd-party/grpc
88-89 # Configure CMake to use gtest from the nix store since we disabled fetching from the internet.
90 cat >> tests/CMakeLists.txt <<'EOF'
91 add_library(gtest INTERFACE)
···111 cmakeFlags = [ "-DMULTIPASS_ENABLE_FLUTTER_GUI=false" ];
112113 buildInputs = [
00114 gtest
115 libapparmor
116 libvirt
···6 cmake,
7 dnsmasq,
8 fetchFromGitHub,
9+ fmt_11,
10 git,
11+ grpc,
12 gtest,
13 iproute2,
14 iptables,
···29 xterm,
30}:
3100000000000032stdenv.mkDerivation {
33 inherit version;
34 pname = "multipassd";
···44 # in the Nix build environment. This patch disables the fetch in favour of providing
45 # the googletest library from nixpkgs.
46 ./cmake_no_fetch.patch
0047 # As of Multipass 1.14.0, the upstream started using vcpkg for grabbing C++ dependencies,
48 # which doesn't work in the nix build environment. This patch reverts that change, in favour
49 # of providing those dependencies manually in this derivation.
···71 --replace-fail "OVMF.fd" "${OVMF.fd}/FV/OVMF.fd" \
72 --replace-fail "QEMU_EFI.fd" "${OVMF.fd}/FV/QEMU_EFI.fd"
7300074 # Configure CMake to use gtest from the nix store since we disabled fetching from the internet.
75 cat >> tests/CMakeLists.txt <<'EOF'
76 add_library(gtest INTERFACE)
···96 cmakeFlags = [ "-DMULTIPASS_ENABLE_FLUTTER_GUI=false" ];
9798 buildInputs = [
99+ fmt_11
100+ grpc
101 gtest
102 libapparmor
103 libvirt