Browse Source

Ladybird/Misc: Add ladybird.nix for nix-shell support

Baitinq 2 năm trước cách đây
mục cha
commit
e74dff7697
2 tập tin đã thay đổi với 28 bổ sung0 xóa
  1. 5 0
      Ladybird/Documentation/BuildInstructions.md
  2. 23 0
      Ladybird/ladybird.nix

+ 5 - 0
Ladybird/Documentation/BuildInstructions.md

@@ -19,6 +19,11 @@ On Fedora or derivatives:
 sudo dnf install cmake libglvnd-devel ninja-build qt6-qtbase-devel qt6-qttools-devel qt6-qtwayland-devel
 ```
 
+On Nix/NixOS
+```
+nix-shell ladybird.nix
+```
+
 On macOS:
 
 ```

+ 23 - 0
Ladybird/ladybird.nix

@@ -0,0 +1,23 @@
+{ pkgs ? import <nixpkgs> { } }:
+pkgs.mkShell.override
+{
+  stdenv = pkgs.gcc12Stdenv;
+}
+{
+  name = "ladybird";
+
+  nativeBuildInputs = with pkgs; [
+    pkgconfig
+    cmake
+    ninja
+    qt6.qtbase
+    qt6.qtbase.dev
+    qt6.qttools
+    qt6.qtwayland
+    qt6.qtwayland.dev
+  ];
+
+  shellHook = ''
+    export QT_QPA_PLATFORM="wayland;xcb"
+  '';
+}