commit 3628e93d1886b311fbd7a5c22bb5ff09d57d7609
parent b346323d0b141ab4e83b4a7e0f5ba49442a70466
Author: Daniel Barlow <dan@telent.net>
Date: Wed, 18 May 2022 10:33:37 +0100
kiwmi debug build
Diffstat:
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git 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
@@ -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
@@ -0,0 +1,9 @@
+with import <nixpkgs> {} ;
+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; }