From 3628e93d1886b311fbd7a5c22bb5ff09d57d7609 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 18 May 2022 10:33:37 +0100 Subject: [PATCH] kiwmi debug build --- default.nix | 3 ++- kiwmi.nix | 5 ++++- shell.nix | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 shell.nix diff --git a/default.nix b/default.nix index 8d52ce2..bb862a6 100644 --- a/default.nix +++ b/default.nix @@ -1,5 +1,6 @@ { stdenv , callPackage +, debug ? false , fetchFromGitHub , fennel @@ -45,7 +46,7 @@ let penlight ]); - kiwmi = callPackage ./kiwmi.nix { lua = lua5_3; }; + kiwmi = callPackage ./kiwmi.nix { lua = lua5_3; inherit debug; }; GIO_EXTRA_MODULES = "${glib-networking}/lib/gio/modules"; in stdenv.mkDerivation { diff --git a/kiwmi.nix b/kiwmi.nix index 804d34a..ba8f6d8 100644 --- a/kiwmi.nix +++ b/kiwmi.nix @@ -1,5 +1,7 @@ { lib , stdenv +, debug ? false + , fetchFromGitHub , cairo , fennel @@ -53,5 +55,6 @@ stdenv.mkDerivation rec { xwayland ]; -# mesonFlags = [ "-Dxwayland=enabled" ]; + dontStrip = debug; + mesonFlags = lib.optionals debug [ "--buildtype=debug" ]; } diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..09a3d2f --- /dev/null +++ b/shell.nix @@ -0,0 +1,9 @@ +with import {} ; +let p = callPackage ./. {}; +in (p.overrideAttrs (o:{ + nativeBuildInputs = [pkgs.gdb]; + shellHook = '' + export LUA_PATH=`lua -e 'print(package.path)'` + export LUA_CPATH=`lua -e 'print(package.cpath)'` + ''; +})).override { debug = true; }