aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
blob: c97285758bfa80e3b80b1c5e5f96856239f7af0e (plain) (blame)
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
44
45
46
47
48
49
{
  inputs = {
    flake-utils.url = "github:numtide/flake-utils";
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";

    lua-luv-source = {
      url = "git+https://github.com/luvit/luv?submodules=1";
      flake = false;
    };
  };

  outputs = { self, nixpkgs, flake-utils, lua-luv-source, ... }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { inherit system; };

        dependencies = with pkgs; [
          qt6.full
          qt6.qtbase
          luajit
          libuv
          luajitPackages.libluv
          luajitPackages.luv
          # libcef
          # nss
        ];
      in {
        packages.default = pkgs.stdenv.mkDerivation {
          pname = "null-browser";
          version = "0.0.0";
          src = ./.;

          buildInputs = dependencies;
          nativeBuildInputs = with pkgs; [ cmake qt6.wrapQtAppsHook pkg-config ];
        };

        devShells.default = pkgs.mkShell rec {
          buildInputs = with pkgs; [
            cmake
            gnumake
            clang-tools
            pkg-config
            # vcpkg
          ] ++ dependencies;

          LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}";
        };
      });
}