summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix56
-rw-r--r--meson_options.txt1
-rw-r--r--subprojects/stela.wrap4
-rw-r--r--taro/meson.build26
4 files changed, 60 insertions, 27 deletions
diff --git a/flake.nix b/flake.nix
index f965287..653eba4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -6,20 +6,37 @@
};
outputs = { self, nixpkgs }: let
+ overlays = [
+ (self: super: {
+ notcurses = super.notcurses.overrideAttrs (oldAttrs: {
+ patches = [
+ ./subprojects/packagefiles/notcurses/duration_and_ffmpeg_fix.diff
+ ];
+ });
+ })
+ ];
forAllSupportedSystems = function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"i686-linux"
"aarch64-linux"
- ] (system: function nixpkgs.legacyPackages.${system});
+ ] (system:
+ function (import nixpkgs {
+ inherit system;
+ inherit overlays;
+ }));
forAllDevSystems = function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"i686-linux"
- ] (system: function nixpkgs.legacyPackages.${system});
+ ] (system:
+ function (import nixpkgs {
+ inherit system;
+ inherit overlays;
+ }));
in rec {
packages = forAllSupportedSystems (pkgs: {
- default = with pkgs; stdenv.mkDerivation {
+ default = with pkgs; stdenv.mkDerivation rec {
name = "mauri";
version = "0.14";
src = fetchgit {
@@ -30,7 +47,7 @@
cd "$out"
${lib.getExe meson} subprojects download \
- libalabaster libnaunet stela janus s3tc-dxt-decompression notcurses
+ libalabaster libnaunet stela janus s3tc-dxt-decompression
cd "$out/subprojects/libalabaster-b5b7657"
${lib.getExe meson} subprojects download c89atomic
@@ -44,6 +61,8 @@
'';
sha256 = "nKZpvxROrTJEAfuIF5N3pjNkGFrultDjdY3i2vLLnSs=";
};
+ window = "wayland";
+ audio = false;
nativeBuildInputs = [
git
gcc
@@ -56,30 +75,36 @@
buildInputs = [
lz4
stb
+ libGL
glm
nlohmann_json
+ jansson
+ notcurses
+ ] ++ lib.optionals audio [
fftw
- glfw3
+ ] ++ lib.optionals (window == "wayland") [
wayland
wayland-protocols
wayland-scanner
wlr-protocols
egl-wayland
+ ] ++ lib.optionals (window == "x11") [
xorg.libXext
xorg.libXrandr
xorg.libXfixes
xorg.libXcursor
libxkbcommon
- jansson
- # notcurses build
- libdeflate
- libunistring
- ncurses
- ffmpeg-headless
+ ] ++ lib.optionals (window == "glfw") [
+ glfw3
+ ];
+ mesonFlags = [
+ "-Dwindow=${window}"
+ ] ++ lib.optionals audio [
+ "-Daudio=enabled"
];
fixupPhase = ''
+ wrapProgram $out/bin/mauri --set __EGL_VENDOR_LIBRARY_DIRS "${pkgs.mesa}/share/glvnd/egl_vendor.d:${pkgs.linuxPackages.nvidia_x11}/share/glvnd/egl_vendor.d"
wrapProgram $out/bin/taro --prefix LD_LIBRARY_PATH : "$out/lib64"
- wrapProgram $out/bin/mauri --set __EGL_VENDOR_LIBRARY_DIRS "${pkgs.mesa}/share/glvnd/egl_vendor.d"
'';
meta = with lib; {
homepage = "https://git.akon.city/mauri";
@@ -126,8 +151,11 @@
libdisplay-info
libliftoff
hwdata
- # notcurses oiio
- openimageio
+ # notcurses build
+ libdeflate
+ libunistring
+ ncurses
+ ffmpeg-headless
];
shellHook = ''
export SHELL="${pkgs.bashInteractive}/bin/bash"
diff --git a/meson_options.txt b/meson_options.txt
index 317d67b..37a4114 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,4 +1,5 @@
option('window', type: 'combo', choices: ['wayland', 'x11', 'win32'], value: 'wayland')
option('taro', type: 'feature', value: 'enabled')
option('audio', type: 'feature', value: 'disabled')
+option('release-asserts', type: 'boolean', value: false, yield: true)
option('tests', type: 'feature', value: 'disabled', yield: true)
diff --git a/subprojects/stela.wrap b/subprojects/stela.wrap
index fda63dd..65d9165 100644
--- a/subprojects/stela.wrap
+++ b/subprojects/stela.wrap
@@ -1,5 +1,5 @@
[wrap-git]
-directory = stela-22e9e4d
+directory = stela-d13e921
url = https://git.akon.city/stela.git
push-url = git@git.akon.city:stela.git
-revision = 22e9e4d6e2c2e8e5eea065e5b7cd04fa6626559c
+revision = d13e92193d21e112f45f3c92cf159f27498a3a55
diff --git a/taro/meson.build b/taro/meson.build
index a5be1e0..a7fa3a1 100644
--- a/taro/meson.build
+++ b/taro/meson.build
@@ -1,29 +1,33 @@
+taro_src = ['ui.c', 'db.c', 'file_ext.c']
+taro_deps = [naunet]
+
notcurses = dependency('notcurses', required: false, allow_fallback: false)
notcurses_core = dependency('notcurses-core', required: false, allow_fallback: false)
if not notcurses.found() or not notcurses_core.found()
notcurses_opts = cmake.subproject_options()
notcurses_opts.add_cmake_defines({ 'CMAKE_BUILD_TYPE': is_debug ? 'Debug' : 'Release' })
- use_oiio = false
- notcurses_opts.add_cmake_defines({ 'USE_CXX': use_oiio })
+ notcurses_opts.add_cmake_defines({ 'USE_CXX': false })
notcurses_opts.add_cmake_defines({ 'USE_DOCTEST': false })
notcurses_opts.add_cmake_defines({ 'USE_PANDOC': false })
notcurses_opts.add_cmake_defines({ 'BUILD_EXECUTABLES': false })
notcurses_opts.add_cmake_defines({ 'BUILD_FFI_LIBRARY': false })
notcurses_opts.add_cmake_defines({ 'USE_POC': false })
- notcurses_opts.add_cmake_defines({ 'USE_STATIC': false })
- notcurses_opts.add_cmake_defines({ 'USE_MULTIMEDIA': use_oiio ? 'oiio' : 'ffmpeg' })
+ notcurses_opts.add_cmake_defines({ 'USE_STATIC': true })
+ notcurses_opts.add_cmake_defines({ 'USE_MULTIMEDIA': 'ffmpeg' })
notcurses_proj = cmake.subproject('notcurses', options: notcurses_opts)
- notcurses = notcurses_proj.dependency('notcurses')
- notcurses_core = notcurses_proj.dependency('notcurses-core')
+ notcurses = notcurses_proj.dependency('notcurses-static')
+ notcurses_core = notcurses_proj.dependency('notcurses-core-static')
+ libdeflate = dependency('libdeflate', static: true)
+ taro_deps += [libdeflate]
endif
+taro_deps += [notcurses, notcurses_core]
-taro_deps = [naunet, notcurses, notcurses_core]
-taro_src = ['ui.c', 'db.c', 'file_ext.c']
-
-tarod_deps = [naunet, stela]
tarod_src = ['daemon.c', 'file_ext.c']
+tarod_deps = [naunet, stela]
executable('taro', taro_src, dependencies: taro_deps, install: true)
executable('tarod', tarod_src, dependencies: tarod_deps, install: true)
-subdir('tests')
+if get_option('tests').enabled()
+ subdir('tests')
+endif