even better so far
This commit is contained in:
parent
24416c338c
commit
400c317dd2
20
flake.nix
20
flake.nix
|
@ -18,13 +18,18 @@
|
||||||
system: let
|
system: let
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {inherit system;};
|
||||||
|
|
||||||
|
llvmPackages = with pkgs;
|
||||||
|
if hostPlatform.isLinux
|
||||||
|
then llvmPackages_20
|
||||||
|
else llvmPackages_19;
|
||||||
|
|
||||||
stdenv = with pkgs;
|
stdenv = with pkgs;
|
||||||
(
|
(
|
||||||
if hostPlatform.isLinux
|
if hostPlatform.isLinux
|
||||||
then stdenvAdapters.useMoldLinker
|
then stdenvAdapters.useMoldLinker
|
||||||
else lib.id
|
else lib.id
|
||||||
)
|
)
|
||||||
llvmPackages_20.stdenv;
|
llvmPackages.stdenv;
|
||||||
|
|
||||||
sources = import ./_sources/generated.nix {
|
sources = import ./_sources/generated.nix {
|
||||||
inherit (pkgs) fetchFromGitHub fetchgit fetchurl dockerTools;
|
inherit (pkgs) fetchFromGitHub fetchgit fetchurl dockerTools;
|
||||||
|
@ -82,8 +87,7 @@
|
||||||
sqlitecpp
|
sqlitecpp
|
||||||
# ftxui
|
# ftxui
|
||||||
]
|
]
|
||||||
++ linuxPkgs
|
++ linuxPkgs;
|
||||||
++ darwinPkgs;
|
|
||||||
|
|
||||||
linuxPkgs = nixpkgs.lib.optionals stdenv.isLinux (with pkgs;
|
linuxPkgs = nixpkgs.lib.optionals stdenv.isLinux (with pkgs;
|
||||||
[
|
[
|
||||||
|
@ -96,12 +100,6 @@
|
||||||
xorg.libX11
|
xorg.libX11
|
||||||
wayland
|
wayland
|
||||||
]));
|
]));
|
||||||
|
|
||||||
darwinPkgs = nixpkgs.lib.optionals stdenv.isDarwin (with pkgs.pkgsStatic.darwin.apple_sdk.frameworks; [
|
|
||||||
Foundation
|
|
||||||
MediaPlayer
|
|
||||||
SystemConfiguration
|
|
||||||
]);
|
|
||||||
in
|
in
|
||||||
with pkgs; {
|
with pkgs; {
|
||||||
packages = rec {
|
packages = rec {
|
||||||
|
@ -144,7 +142,7 @@
|
||||||
|
|
||||||
clang-format = {
|
clang-format = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.llvmPackages_20.clang-tools;
|
package = pkgs.llvmPackages.clang-tools;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -154,7 +152,7 @@
|
||||||
[
|
[
|
||||||
alejandra
|
alejandra
|
||||||
bear
|
bear
|
||||||
llvmPackages_20.clang-tools
|
llvmPackages.clang-tools
|
||||||
cmake
|
cmake
|
||||||
lldb
|
lldb
|
||||||
hyperfine
|
hyperfine
|
||||||
|
|
34
meson.build
34
meson.build
|
@ -6,6 +6,7 @@ project(
|
||||||
'default_library=static',
|
'default_library=static',
|
||||||
'warning_level=everything',
|
'warning_level=everything',
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
|
'cpp_args=-fvisibility=hidden',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -28,7 +29,6 @@ if host_machine.system() == 'darwin'
|
||||||
'-Wno-pre-c++20-compat-pedantic',
|
'-Wno-pre-c++20-compat-pedantic',
|
||||||
'-Wno-switch-default',
|
'-Wno-switch-default',
|
||||||
'-Wunused-function',
|
'-Wunused-function',
|
||||||
'-fvisibility=hidden',
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
language: 'objcpp',
|
language: 'objcpp',
|
||||||
|
@ -47,7 +47,6 @@ common_cpp_args = [
|
||||||
'-Wno-pre-c++20-compat-pedantic',
|
'-Wno-pre-c++20-compat-pedantic',
|
||||||
'-Wno-switch-default',
|
'-Wno-switch-default',
|
||||||
'-Wunused-function',
|
'-Wunused-function',
|
||||||
'-fvisibility=hidden',
|
|
||||||
'-fno-strict-enums',
|
'-fno-strict-enums',
|
||||||
'-nostdlib++',
|
'-nostdlib++',
|
||||||
]
|
]
|
||||||
|
@ -86,6 +85,22 @@ deps = [
|
||||||
dependency('tomlplusplus', include_type: 'system', static: true),
|
dependency('tomlplusplus', include_type: 'system', static: true),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if host_machine.system() == 'darwin'
|
||||||
|
deps += dependency(
|
||||||
|
'appleframeworks',
|
||||||
|
modules : ['foundation', 'mediaplayer', 'systemconfiguration'],
|
||||||
|
static: true,
|
||||||
|
)
|
||||||
|
elif host_machine.system() == 'linux' or host_machine.system() == 'freebsd'
|
||||||
|
deps += dependency('SQLiteCpp')
|
||||||
|
deps += dependency('sdbus-c++')
|
||||||
|
deps += dependency('x11')
|
||||||
|
deps += dependency('xcb')
|
||||||
|
deps += dependency('xau')
|
||||||
|
deps += dependency('xdmcp')
|
||||||
|
deps += dependency('wayland-client')
|
||||||
|
endif
|
||||||
|
|
||||||
ftxui_dep = dependency(
|
ftxui_dep = dependency(
|
||||||
'ftxui',
|
'ftxui',
|
||||||
modules: ['ftxui::screen', 'ftxui::dom', 'ftxui::component'],
|
modules: ['ftxui::screen', 'ftxui::dom', 'ftxui::component'],
|
||||||
|
@ -109,21 +124,6 @@ reflectcpp_proj = cmake.subproject('reflectcpp')
|
||||||
reflectcpp_dep = reflectcpp_proj.dependency('reflectcpp')
|
reflectcpp_dep = reflectcpp_proj.dependency('reflectcpp')
|
||||||
deps += reflectcpp_dep
|
deps += reflectcpp_dep
|
||||||
|
|
||||||
if host_machine.system() == 'darwin'
|
|
||||||
deps += dependency('Foundation')
|
|
||||||
deps += dependency('MediaPlayer')
|
|
||||||
deps += dependency('SystemConfiguration')
|
|
||||||
deps += dependency('iconv')
|
|
||||||
elif host_machine.system() == 'linux' or host_machine.system() == 'freebsd'
|
|
||||||
deps += dependency('SQLiteCpp')
|
|
||||||
deps += dependency('sdbus-c++')
|
|
||||||
deps += dependency('x11')
|
|
||||||
deps += dependency('xcb')
|
|
||||||
deps += dependency('xau')
|
|
||||||
deps += dependency('xdmcp')
|
|
||||||
deps += dependency('wayland-client')
|
|
||||||
endif
|
|
||||||
|
|
||||||
objc_args = []
|
objc_args = []
|
||||||
link_args = []
|
link_args = []
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
#include <rfl.hpp>
|
#include <rfl.hpp>
|
||||||
#include <rfl/Field.hpp>
|
#include <rfl/Field.hpp>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue