2023-06-29 02:31:03 +02:00
|
|
|
{ pkgs ? import <nixpkgs> { }
|
|
|
|
, local ? false
|
|
|
|
, full ? true
|
|
|
|
}:
|
|
|
|
pkgs.stdenv.mkDerivation rec {
|
|
|
|
pname = "logdiag";
|
|
|
|
version = "master";
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
2023-06-29 20:32:43 +02:00
|
|
|
wrapGAppsHook
|
2023-06-29 02:31:03 +02:00
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
2024-01-11 18:26:06 +01:00
|
|
|
gnome.adwaita-icon-theme
|
2023-06-29 02:31:03 +02:00
|
|
|
gtk3
|
|
|
|
json-glib
|
|
|
|
lua5_2
|
|
|
|
|
|
|
|
# To address pkg-config warnings, all the way down.
|
|
|
|
libthai
|
|
|
|
pcre2
|
|
|
|
libdatrie
|
|
|
|
libepoxy
|
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
|
|
|
libxkbcommon
|
|
|
|
xorg.libXdmcp
|
|
|
|
xorg.libXtst
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
util-linux
|
|
|
|
libselinux
|
|
|
|
libsepol
|
|
|
|
pcre
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = with pkgs; lib.optionals (!stdenv.isDarwin) [
|
|
|
|
xvfb-run
|
|
|
|
];
|
|
|
|
|
|
|
|
src = if local then
|
|
|
|
builtins.path {
|
|
|
|
path = ../${pname}/git;
|
|
|
|
name = "${pname}";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchGit {
|
|
|
|
url = "https://git.janouch.name/p/${pname}.git";
|
|
|
|
submodules = true;
|
|
|
|
ref = "master";
|
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_TESTING=ON"
|
|
|
|
];
|
|
|
|
|
2024-01-11 18:26:06 +01:00
|
|
|
# See nixpkgs commit b1e73fa2e086f1033a33d93524ae2a1781d12b95 about icons.
|
2024-01-11 19:02:24 +01:00
|
|
|
# It might make sense to name {hicolor,gnome.adwaita}-icon-theme/share
|
|
|
|
# explicitly, to limit undesired dependencies.
|
2024-01-11 18:26:06 +01:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2023-06-29 02:31:03 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = with pkgs; ''
|
|
|
|
runHook preCheck
|
|
|
|
${lib.optionalString (!stdenv.isDarwin) "xvfb-run"} \
|
|
|
|
ctest --force-new-ctest-process
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with pkgs.lib; {
|
|
|
|
description = "Schematic editor";
|
|
|
|
homepage = "https://git.janouch.name/p/${pname}";
|
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.bsd0;
|
|
|
|
};
|
|
|
|
}
|