From 571ce3472d8d1277b0028dfd8118c6c8619afc34 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 9 Mar 2025 00:24:21 +0530 Subject: Add build default package to flake.nix --- flake.nix | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 7f817b9..ed3f539 100644 --- a/flake.nix +++ b/flake.nix @@ -5,30 +5,34 @@ }; outputs = { self, nixpkgs, flake-utils, ... }: - let - shell = { pkgs, ... }: - pkgs.mkShell rec { + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + packages = with pkgs; [ + pkg-config + qt6.full + qt6.qtbase + luajit + # libcef + # nss + ]; + in { + packages.default = pkgs.stdenv.mkDerivation { + pname = "web-browser"; + version = "0.0.0"; + src = ./.; + + buildInputs = packages; + nativeBuildInputs = with pkgs; [ cmake qt6.wrapQtAppsHook ]; + }; + + devShells.default = pkgs.mkShell rec { buildInputs = with pkgs; [ cmake gnumake - pkg-config clang-tools - - pkgs.qt6.full - luajit - # lua51Packages.lua - # libcef - # nss - ]; - nativeBuildInputs = []; - - # CEF_PACKAGE_PATH = "${pkgs.libcef}"; - LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath (buildInputs ++ nativeBuildInputs)}"; + ] ++ packages; + LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}"; }; - in flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { inherit system; }; - in { - devShells.default = shell { inherit pkgs system; }; }); } -- cgit v1.3.1