|
|
|
@ -4,7 +4,6 @@ |
|
|
|
|
, ninja |
|
|
|
|
, pkg-config |
|
|
|
|
, gettext |
|
|
|
|
, gobject-introspection |
|
|
|
|
, bison |
|
|
|
|
, flex |
|
|
|
|
, python3 |
|
|
|
@ -17,6 +16,8 @@ |
|
|
|
|
, bash-completion |
|
|
|
|
, lib |
|
|
|
|
, CoreServices |
|
|
|
|
, withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform |
|
|
|
|
, gobject-introspection |
|
|
|
|
}: |
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec { |
|
|
|
@ -37,6 +38,7 @@ stdenv.mkDerivation rec { |
|
|
|
|
sha256 = "0cghi6n4nhdbajz3wqcgbh5xm94myvnqgsi9g2bz9n1s9904l2fy"; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
strictDeps = true; |
|
|
|
|
nativeBuildInputs = [ |
|
|
|
|
meson |
|
|
|
|
ninja |
|
|
|
@ -47,11 +49,14 @@ stdenv.mkDerivation rec { |
|
|
|
|
python3 |
|
|
|
|
makeWrapper |
|
|
|
|
glib |
|
|
|
|
gobject-introspection |
|
|
|
|
bash-completion |
|
|
|
|
|
|
|
|
|
# documentation |
|
|
|
|
# TODO add hotdoc here |
|
|
|
|
] ++ lib.optionals stdenv.isLinux [ |
|
|
|
|
libcap # for setcap binary |
|
|
|
|
] ++ lib.optionals withIntrospection [ |
|
|
|
|
gobject-introspection |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
buildInputs = [ |
|
|
|
@ -60,6 +65,8 @@ stdenv.mkDerivation rec { |
|
|
|
|
libcap |
|
|
|
|
libunwind |
|
|
|
|
elfutils |
|
|
|
|
] ++ lib.optionals withIntrospection [ |
|
|
|
|
gobject-introspection |
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ |
|
|
|
|
CoreServices |
|
|
|
|
]; |
|
|
|
@ -72,8 +79,7 @@ stdenv.mkDerivation rec { |
|
|
|
|
"-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those |
|
|
|
|
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users |
|
|
|
|
"-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing |
|
|
|
|
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ |
|
|
|
|
"-Dintrospection=disabled" |
|
|
|
|
"-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" |
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ |
|
|
|
|
# darwin.libunwind doesn't have pkg-config definitions so meson doesn't detect it. |
|
|
|
|
"-Dlibunwind=disabled" |
|
|
|
|