vanadium: fix build

packages/ruler: update

vanadium/overlays/fcitx5: fix patch

vanadium/overlays/fcitx5-chinese-addons: fix patch

treewide: system -> stdenv.hostPlatform.system

vanadium: fix warnings
This commit is contained in:
Primrose 2025-11-26 08:52:29 +08:00
parent b7b2083c74
commit b0b7222d48
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
22 changed files with 78 additions and 86 deletions

View file

@ -25,7 +25,7 @@
pkgs.hutils
# pretty tui tools
pkgs.du-dust
pkgs.dust
pkgs.tokei
pkgs.hyperfine
pkgs.watchexec

View file

@ -27,7 +27,7 @@
pkgs.nix-which
# # pretty tui tools
# pkgs.du-dust
# pkgs.dust
# pkgs.tokei
# pkgs.hyperfine
# pkgs.watchexec

View file

@ -50,7 +50,7 @@
pkgs.zbar
# pdf
pkgs.poppler_utils # pdfseparate, pdfunite
pkgs.poppler-utils # pdfseparate, pdfunite
pkgs.easyscan
# fun
@ -62,7 +62,7 @@
# pkgs.necrolib
# pretty tui tools
pkgs.du-dust
pkgs.dust
pkgs.tokei
pkgs.hyperfine
pkgs.watchexec

View file

@ -1,7 +1,7 @@
{
services.logind = {
services.logind.settings = {
# Note: vanadium's btrfs disk layout has been changed and the swap has been reduced. It will not work with hibernate anymore.
lidSwitch = "suspend";
lidSwitchDocked = "ignore";
Login.HandleLidSwitch = "suspend";
Login.HandleLidSwitchDocked = "ignore";
};
}

View file

@ -53,31 +53,19 @@ infuse {
./patches/fcitx5/disable-quickphrase.patch
./patches/fcitx5/disable-unicode.patch
];
fcitx5-chinese-addons.__output.cmakeFlags.__append = [
qt6Packages.fcitx5-chinese-addons.__output.cmakeFlags.__append = [
(lib.cmakeFeature "ENABLE_BROWSER" "Off")
(lib.cmakeFeature "ENABLE_CLOUDPINYIN" "Off")
(lib.cmakeFeature "ENABLE_CLOUDPINYIN" "Off") # c.f. patch below
(lib.cmakeFeature "ENABLE_DATA" "Off")
];
fcitx5-chinese-addons.__output.patches.__append = [
qt6Packages.fcitx5-chinese-addons.__output.patches.__append = [
./patches/fcitx5-chinese-addons/disable-chttrans.patch
./patches/fcitx5-chinese-addons/disable-fullwidth.patch
(final.fetchpatch {
name = "cloudpinyin-disable-build"; # without this the option would fail
url = "https://github.com/fcitx/fcitx5-chinese-addons/commit/92ffd494273a5573347c1fe2667fb8d67a5303db.patch";
hash = "sha256-Mo5l8tsn1JQxTFHxOZfQRmbCeWZHLyxfn2Qwv/gQXGA=";
})
# Note: disabling pinyin helper breaks canjie
];
# Security, Xorg vuln
# Backport has failed in upstream currently <https://github.com/NixOS/nixpkgs/pull/457804>,
# might as well patch it while people are blogging about it <https://github.com/Xe/site/pull/1062>
# Upstream talks about it here https://lists.x.org/archives/xorg-announce/2025-October/003635.html
xorg.xorgserver.__output.version =
oldVersion:
let
version = "21.1.20";
in
if oldVersion == version then throw "This patch has been merged upstream" else version;
xorg.xorgserver.__output.src =
_:
final.fetchurl {
url = "mirror://xorg/individual/xserver/xorg-server-21.1.20.tar.xz";
sha256 = "sha256-dpW8YYJLOoG2utL3iwVADKAVAD3kAtGzIhFxBbcC6Tc=";
};
}

View file

@ -1,5 +1,5 @@
diff --git a/modules/chttrans/CMakeLists.txt b/modules/chttrans/CMakeLists.txt
index 6c73ea8..8ed5660 100644
index e2f5f43..61c6590 100644
--- a/modules/chttrans/CMakeLists.txt
+++ b/modules/chttrans/CMakeLists.txt
@@ -1,20 +1,20 @@
@ -10,7 +10,7 @@ index 6c73ea8..8ed5660 100644
- set(CHTTRANS_SOURCES ${CHTTRANS_SOURCES} chttrans-opencc.cpp)
-endif()
-add_fcitx5_addon(chttrans ${CHTTRANS_SOURCES})
-target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications Boost::iostreams ${FMT_TARGET})
-target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications)
-if (ENABLE_OPENCC)
- target_link_libraries(chttrans OpenCC::OpenCC)
- if (TARGET Boost::json)
@ -25,7 +25,7 @@ index 6c73ea8..8ed5660 100644
+# set(CHTTRANS_SOURCES ${CHTTRANS_SOURCES} chttrans-opencc.cpp)
+# endif()
+# add_fcitx5_addon(chttrans ${CHTTRANS_SOURCES})
+# target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications Boost::iostreams ${FMT_TARGET})
+# target_link_libraries(chttrans Fcitx5::Core Fcitx5::Config Fcitx5::Module::Notifications)
+# if (ENABLE_OPENCC)
+# target_link_libraries(chttrans OpenCC::OpenCC)
+# if (TARGET Boost::json)
@ -42,7 +42,7 @@ index 6c73ea8..8ed5660 100644
+# COMPONENT config)
+# install(FILES gbks2t.tab DESTINATION "${CMAKE_INSTALL_DATADIR}/fcitx5/chttrans" COMPONENT config)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 994a4d1..9322834 100644
index 5a8c94c..2feccd0 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -23,10 +23,10 @@ add_dependencies(testfullwidth fullwidth fullwidth.conf.in-fmt)
@ -50,14 +50,13 @@ index 994a4d1..9322834 100644
add_subdirectory(inputmethod)
-add_executable(testchttrans testchttrans.cpp)
-target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread)
-target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM)
-add_dependencies(testchttrans chttrans chttrans.conf.in-fmt copy-addon copy-testim)
-add_test(NAME testchttrans COMMAND testchttrans)
+# add_executable(testchttrans testchttrans.cpp)
+# target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread)
+# target_link_libraries(testchttrans Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM)
+# add_dependencies(testchttrans chttrans chttrans.conf.in-fmt copy-addon copy-testim)
+# add_test(NAME testchttrans COMMAND testchttrans)
add_subdirectory(addon)
add_executable(testpinyin testpinyin.cpp)

View file

@ -22,7 +22,7 @@ index 6e275bd..2dabd86 100644
+# install(FILES "${CMAKE_CURRENT_BINARY_DIR}/fullwidth.conf" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/addon"
+# COMPONENT config)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 994a4d1..f354bfd 100644
index 5a8c94c..0f0b130 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -17,10 +17,10 @@ target_link_libraries(testpinyinhelper Fcitx5::Core Fcitx5::Module::PinyinHelper
@ -30,14 +30,13 @@ index 994a4d1..f354bfd 100644
add_test(NAME testpinyinhelper COMMAND testpinyinhelper)
-add_executable(testfullwidth testfullwidth.cpp)
-target_link_libraries(testfullwidth Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread)
-target_link_libraries(testfullwidth Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM)
-add_dependencies(testfullwidth fullwidth fullwidth.conf.in-fmt)
-add_test(NAME testfullwidth COMMAND testfullwidth)
+# add_executable(testfullwidth testfullwidth.cpp)
+# target_link_libraries(testfullwidth Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM Pthread::Pthread)
+# target_link_libraries(testfullwidth Fcitx5::Core Fcitx5::Module::TestFrontend Fcitx5::Module::TestIM)
+# add_dependencies(testfullwidth fullwidth fullwidth.conf.in-fmt)
+# add_test(NAME testfullwidth COMMAND testfullwidth)
add_subdirectory(inputmethod)
add_executable(testchttrans testchttrans.cpp)

View file

@ -1,8 +1,8 @@
diff --git a/src/modules/clipboard/CMakeLists.txt b/src/modules/clipboard/CMakeLists.txt
index 997c4e3e..4163cada 100644
index afeaa6d3..ad4e77e0 100644
--- a/src/modules/clipboard/CMakeLists.txt
+++ b/src/modules/clipboard/CMakeLists.txt
@@ -1,21 +1,21 @@
@@ -1,25 +1,25 @@
-add_fcitx5_addon(clipboard)
-
-target_sources(clipboard PRIVATE clipboard.cpp)
@ -15,7 +15,11 @@ index 997c4e3e..4163cada 100644
-
-if (WAYLAND_FOUND)
- target_sources(clipboard PRIVATE waylandclipboard.cpp)
- target_link_libraries(clipboard Fcitx5::Module::Wayland Fcitx5::Wayland::WLRDataControl Pthread::Pthread)
- target_link_libraries(clipboard
- Fcitx5::Module::Wayland
- Fcitx5::Wayland::WLRDataControl
- Fcitx5::Wayland::ExtDataControl
- Pthread::Pthread)
-endif()
-
-install(TARGETS clipboard DESTINATION "${FCITX_INSTALL_ADDONDIR}")
@ -33,7 +37,11 @@ index 997c4e3e..4163cada 100644
+#
+# if (WAYLAND_FOUND)
+# target_sources(clipboard PRIVATE waylandclipboard.cpp)
+# target_link_libraries(clipboard Fcitx5::Module::Wayland Fcitx5::Wayland::WLRDataControl Pthread::Pthread)
+# target_link_libraries(clipboard
+# Fcitx5::Module::Wayland
+# Fcitx5::Wayland::WLRDataControl
+# Fcitx5::Wayland::ExtDataControl
+# Pthread::Pthread)
+# endif()
+#
+# install(TARGETS clipboard DESTINATION "${FCITX_INSTALL_ADDONDIR}")
@ -42,4 +50,3 @@ index 997c4e3e..4163cada 100644
configure_file(clipboard.conf.in.in clipboard.conf.in @ONLY)
fcitx5_translate_desktop_file(${CMAKE_CURRENT_BINARY_DIR}/clipboard.conf.in clipboard.conf)
fcitx5_export_module(Clipboard TARGET clipboard BUILD_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}" HEADERS clipboard_public.h INSTALL)

View file

@ -25,10 +25,10 @@ index b5bc37ac..04f4da59 100644
+# FILES_MATCHING PATTERN "*.mb")
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 97eed1f3..53e09977 100644
index 643d96f4..0916c732 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -147,10 +147,10 @@ if (ENABLE_KEYBOARD)
@@ -162,10 +162,10 @@ if (ENABLE_KEYBOARD)
add_test(NAME testspell COMMAND testspell)
endif()
@ -43,4 +43,3 @@ index 97eed1f3..53e09977 100644
if (ENABLE_X11)
add_executable(testxim testxim.cpp)

View file

@ -1,13 +1,13 @@
diff --git a/src/modules/unicode/CMakeLists.txt b/src/modules/unicode/CMakeLists.txt
index 73f7e064..afddabee 100644
index 11512ecf..9efde8ac 100644
--- a/src/modules/unicode/CMakeLists.txt
+++ b/src/modules/unicode/CMakeLists.txt
@@ -1,11 +1,11 @@
-add_fcitx5_addon(unicode unicode.cpp charselectdata.cpp)
-target_link_libraries(unicode Fcitx5::Core Fcitx5::Module::Clipboard ${FMT_TARGET})
-target_link_libraries(unicode Fcitx5::Core Fcitx5::Module::Clipboard)
-install(TARGETS unicode DESTINATION "${FCITX_INSTALL_ADDONDIR}")
+# add_fcitx5_addon(unicode unicode.cpp charselectdata.cpp)
+# target_link_libraries(unicode Fcitx5::Core Fcitx5::Module::Clipboard ${FMT_TARGET})
+# target_link_libraries(unicode Fcitx5::Core Fcitx5::Module::Clipboard)
+# install(TARGETS unicode DESTINATION "${FCITX_INSTALL_ADDONDIR}")
configure_file(unicode.conf.in.in unicode.conf.in @ONLY)
fcitx5_translate_desktop_file(${CMAKE_CURRENT_BINARY_DIR}/unicode.conf.in unicode.conf)
@ -21,10 +21,10 @@ index 73f7e064..afddabee 100644
+# install(FILES charselectdata DESTINATION "${FCITX_INSTALL_PKGDATADIR}/unicode" COMPONENT config)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 97eed1f3..ff902c88 100644
index 643d96f4..d008183a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -134,10 +134,10 @@ add_dependencies(testemoji emoji emoji.conf.in-fmt)
@@ -149,10 +149,10 @@ add_dependencies(testemoji emoji emoji.conf.in-fmt)
add_test(NAME testemoji COMMAND testemoji)
endif()

View file

@ -10,7 +10,7 @@ in
{
i18n.inputMethod = {
fcitx5.addons = [
pkgs.fcitx5-chinese-addons
pkgs.qt6Packages.fcitx5-chinese-addons
pkgs.fcitx5-table-extra
];
};

View file

@ -8,21 +8,21 @@
# git plugins
programs.git = {
lfs.enable = true;
patdiff.enable = lib.mkMerge [
# known to fail on aarch64-linux
(lib.mkIf (pkgs.system == "aarch64-linux") (
# TODO: investigate this
lib.warn "patdiff has been forcibly disabled because it has previously failed to build" lib.mkForce
false
))
(lib.mkDefault true)
];
};
programs.patdiff.enable = lib.mkMerge [
# known to fail on aarch64-linux
(lib.mkIf (pkgs.stdenv.hostPlatform.system == "aarch64-linux") (
# TODO: investigate this
lib.warn "patdiff has been forcibly disabled because it has previously failed to build" lib.mkForce
false
))
(lib.mkDefault true)
];
# 懶惰鬼賴皮
programs.lazygit =
let
patdiffCfg = config.programs.git.patdiff;
patdiffCfg = config.programs.patdiff;
in
lib.mkIf patdiffCfg.enable {
settings = {
@ -32,7 +32,7 @@
# git itself
programs.git = {
extraConfig = {
settings = {
init.defaultBranch = "trunk"; # I like trees
push.autoSetupRemote = true;
pull.ff = "only";
@ -60,9 +60,9 @@
};
# identity
programs.git = {
userEmail = "leana.jiang+git@icloud.com";
userName = "Léana ";
programs.git.settings = {
user.email = "leana.jiang+git@icloud.com";
user.name = "Léana ";
signing = {
key = "0x4E887A4CA9714ADA";
signByDefault = lib.mkDefault false;

View file

@ -3,5 +3,5 @@ let
in
final: _: {
# Use flake so the package inputs is pinned
agenix = sources.agenix.asFlake.packages.${final.system}.default;
agenix = sources.agenix.asFlake.packages.${final.stdenv.hostPlatform.system}.default;
}

View file

@ -2,5 +2,5 @@ let
sources = import ../../npins;
in
final: _: {
disko = sources.disko.asFlake.packages.${final.system}.default;
disko = sources.disko.asFlake.packages.${final.stdenv.hostPlatform.system}.default;
}

View file

@ -2,5 +2,5 @@ let
sources = import ../../npins;
in
final: _: {
dix = sources.dix.asFlake.packages.${final.system}.default;
dix = sources.dix.asFlake.packages.${final.stdenv.hostPlatform.system}.default;
}

View file

@ -2,5 +2,5 @@ let
sources = import ../../npins;
in
final: _: {
eepy = sources.eepy.asFlake.packages.${final.system}.default;
eepy = sources.eepy.asFlake.packages.${final.stdenv.hostPlatform.system}.default;
}

View file

@ -5,7 +5,7 @@ in
final: _: {
nil =
let
pkg = sources.nil.asFlake.packages.${final.system}.default;
pkg = sources.nil.asFlake.packages.${final.stdenv.hostPlatform.system}.default;
in
pkg.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [

View file

@ -3,7 +3,7 @@ let
in
# The final nix is lix in this case
final: prev: {
nix-monitored = sources.nix-monitored.asFlake.packages.${final.system}.default.override {
nix-monitored = sources.nix-monitored.asFlake.packages.${final.stdenv.hostPlatform.system}.default.override {
inherit (final) nix;
withNotify = false; # noisy, spams "command completed" even for nix shells
};

View file

@ -4,5 +4,5 @@ let
sources = import ../../npins;
in
final: _: {
nix-tree = (import sources.nix-tree).packages.${final.system}.default;
nix-tree = (import sources.nix-tree).packages.${final.stdenv.hostPlatform.system}.default;
}

View file

@ -1,7 +1,7 @@
{
writeShellApplication,
sane-backends,
poppler_utils,
poppler-utils,
fzf,
ghostscript,
}:
@ -10,7 +10,7 @@ writeShellApplication {
runtimeInputs = [
sane-backends
poppler_utils
poppler-utils
fzf
ghostscript
];

View file

@ -11,8 +11,8 @@ let
domain = "git.confusedcompiler.org";
owner = "leana8959";
repo = "ruler";
rev = "adb153af8aab6e0350e396de1f26316d97df3add";
hash = "sha256-8+at3h5udcLXqbsaPcQ5HMGZMd6brZ21d/VW3kSyMFw=";
rev = "6cdadb92b8cff6d57bc1d15061923bfbf40ede71";
hash = "sha256-TwUXpgdmGBUgyxyN/nRReu3VniYdLkAVp1Q72r9ouBI=";
}) { };
cabalOverrides = o: {