This commit is contained in:
2025-05-14 17:54:39 +08:00
parent 6f955e6f43
commit 5e6acc9c20
20 changed files with 97 additions and 193 deletions

View File

@@ -2,9 +2,11 @@
* update src
* fix all build errors
* update modules
* submit pr: sivermont
* update postgresql nextcloud mariadb
* update stateVersion
* test peertube ffmpeg working or not
* test jaxlib build
* add haskell patch
* update phonopy
* switch
* fix disabled packages
* upstream patches
* merge upstream again
* switch
* build all

37
flake.lock generated
View File

@@ -872,11 +872,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1747100152,
"narHash": "sha256-bGgTo861gpHBOOPf9ZnDkXa/NyqDajFNEHjg4V1TtMY=",
"lastModified": 1747271535,
"narHash": "sha256-uLeHqzJwUalcsGHIIhUfl3q16UeCDU0XdvsoRK8CyGc=",
"owner": "CHN-beta",
"repo": "nixpkgs",
"rev": "370a8a5c1926ace3e05f26d3abd30a10ac0af812",
"rev": "83f39e2293278f7d88ba43f16cafddf24ba8ed4f",
"type": "github"
},
"original": {
@@ -886,7 +886,7 @@
"type": "github"
}
},
"nixpkgs-23.05": {
"nixpkgs-2305": {
"locked": {
"lastModified": 1701326464,
"narHash": "sha256-WGt5wjvkzCgRVXCS7OHd6vyv2xX6RZDpZk5i/vxLc1U=",
@@ -902,7 +902,7 @@
"type": "github"
}
},
"nixpkgs-23.11": {
"nixpkgs-2311": {
"locked": {
"lastModified": 1735377590,
"narHash": "sha256-U9W9H/HYoaKa5wzSL2IBmnFDhxlesuKAcKi/hl5xPvE=",
@@ -918,6 +918,22 @@
"type": "github"
}
},
"nixpkgs-2411": {
"locked": {
"lastModified": 1746924970,
"narHash": "sha256-R7LF9fxLIoZdiQQeHVpNQj6lC59EZkAj4BvcOJsmkXw=",
"owner": "CHN-beta",
"repo": "nixpkgs",
"rev": "f2db4d060c807151ad6c1717015c2da925527234",
"type": "github"
},
"original": {
"owner": "CHN-beta",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-24_05": {
"locked": {
"lastModified": 1735563628,
@@ -1268,8 +1284,9 @@
"nix-vscode-extensions": "nix-vscode-extensions",
"nixos-wallpaper": "nixos-wallpaper",
"nixpkgs": "nixpkgs",
"nixpkgs-23.05": "nixpkgs-23.05",
"nixpkgs-23.11": "nixpkgs-23.11",
"nixpkgs-2305": "nixpkgs-2305",
"nixpkgs-2311": "nixpkgs-2311",
"nixpkgs-2411": "nixpkgs-2411",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixvirt": "nixvirt",
"nu-scripts": "nu-scripts",
@@ -1354,11 +1371,11 @@
]
},
"locked": {
"lastModified": 1745637907,
"narHash": "sha256-9Q7mKzRfSZGvKmbkbtZ3GKqcL0VxyxkyR76Yc2Ypuqs=",
"lastModified": 1747095887,
"narHash": "sha256-YoUijZIPHHaLrQswMzWUWlEl0ZR2aE9sb2Gsr68AC4o=",
"owner": "ShadowRZ",
"repo": "nur-packages",
"rev": "b87f9a470a5856219fdcbfaab6c0931acc7f3b7a",
"rev": "8522a81a43d9648e8a7afa9ed843e1eb802be9a8",
"type": "github"
},
"original": {

View File

@@ -5,8 +5,9 @@
{
self.lfs = true;
nixpkgs.url = "github:CHN-beta/nixpkgs/nixos-25.05";
"nixpkgs-23.11".url = "github:CHN-beta/nixpkgs/nixos-23.11";
"nixpkgs-23.05".url = "github:CHN-beta/nixpkgs/nixos-23.05";
nixpkgs-2411.url = "github:CHN-beta/nixpkgs/nixos-24.11";
nixpkgs-2311.url = "github:CHN-beta/nixpkgs/nixos-23.11";
nixpkgs-2305.url = "github:CHN-beta/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:CHN-beta/nixpkgs/nixos-unstable";
home-manager = { url = "github:CHN-beta/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; };
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };

View File

@@ -42,7 +42,7 @@
{
inherit localLib;
tokenPath = inputs.self.nixosConfigurations.pc.config.sops.secrets."acme/token".path;
octodns = pkgs.octodns.withProviders (_: with _; [ cloudflare ]);
octodns = pkgs.octodns.withProviders (_: with pkgs.octodns-providers; [ cloudflare ]);
};
}
// (builtins.listToAttrs (builtins.map

View File

@@ -120,7 +120,7 @@
src = pkgs.fetchzip
{
url = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/pslist/1.4.0-6/pslist_1.4.0.orig.tar.xz";
sha256 = "1yw48jvvf69x6i73p196j4rd3r5qpdjk9y80nikh328rd6bkr211";
sha256 = "1sp1h7ccniz658ms331npffpa9iz8llig43d9mlysll420nb3xqv";
};
};
vaspkit = rec

View File

@@ -62,16 +62,16 @@ inputs:
google-chrome tor-browser microsoft-edge
# office
crow-translate zotero pandoc texliveFull poppler_utils pdftk pdfchain davinci-resolve
ydict texstudio panoply pspp paperwork libreoffice-qt6-fresh ocrmypdf typst
ydict texstudio panoply pspp libreoffice-qt6-fresh ocrmypdf typst # paperwork
# required by ltex-plus.vscode-ltex-plus
ltex-ls ltex-ls-plus
# matplot++ needs old gnuplot
inputs.pkgs."pkgs-23.11".gnuplot
inputs.pkgs.pkgs-2311.gnuplot
# math, physics and chemistry
octaveFull ovito localPackages.vesta localPackages.v-sim jmol mpi geogebra6 localPackages.ufo
(quantum-espresso.override { stdenv = gcc14Stdenv; gfortran = gfortran14;
wannier90 = inputs.pkgs.wannier90.overrideAttrs { buildFlags = [ "dynlib" ]; }; })
inputs.pkgs."pkgs-23.11".hdfview numbat qalculate-qt
inputs.pkgs.pkgs-2311.hdfview numbat qalculate-qt
# virtualization
virt-viewer bottles wineWowPackages.stagingFull genymotion playonlinux
# media

View File

@@ -6,11 +6,7 @@ inputs:
{
nixos.packages.packages =
let
root = inputs.pkgs.root.overrideAttrs (prev:
{
patches = prev.patches or [] ++ [ ./17253.patch ./17273.patch ];
cmakeFlags = prev.cmakeFlags ++ [ "-DCMAKE_CXX_STANDARD=23" ];
});
inherit (inputs.pkgs) root;
jupyterPath = inputs.pkgs.jupyter-kernel.create { definitions.root = rec
{
displayName = "ROOT";

View File

@@ -1,151 +0,0 @@
From 1d2acc921853825af02059183b683c35f5075302 Mon Sep 17 00:00:00 2001
From: chn <chn@chn.moe>
Date: Wed, 11 Dec 2024 22:33:40 +0800
Subject: [PATCH] add C++23 support
---
graf3d/eve7/inc/ROOT/REveCaloData.hxx | 4 ++--
graf3d/eve7/src/REveCaloData.cxx | 3 +++
interpreter/cling/lib/Interpreter/CIFactory.cpp | 15 +++++++++++----
.../Interpreter/IncrementalCUDADeviceCompiler.cpp | 2 ++
.../cling/tools/Jupyter/kernel/clingkernel.py | 4 ++--
.../inc/RooStats/HistFactory/HistRef.h | 3 +--
.../inc/RooFit/Detail/NormalizationHelpers.h | 3 +--
7 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/graf3d/eve7/inc/ROOT/REveCaloData.hxx b/graf3d/eve7/inc/ROOT/REveCaloData.hxx
index 79d2e7069504c..33152334730f4 100644
--- a/graf3d/eve7/inc/ROOT/REveCaloData.hxx
+++ b/graf3d/eve7/inc/ROOT/REveCaloData.hxx
@@ -174,7 +174,7 @@ protected:
public:
REveCaloData(const char* n="REveCaloData", const char* t="");
- ~REveCaloData() override {}
+ ~REveCaloData() override;
void FillImpliedSelectedSet(Set_t& impSelSet, const std::set<int>& sec_idcs) override;
@@ -220,7 +220,7 @@ public:
Bool_t GetWrapTwoPi() const { return fWrapTwoPi; }
void SetWrapTwoPi(Bool_t w) { fWrapTwoPi=w; }
- void SetSelector(REveCaloDataSelector* iSelector) { fSelector.reset(iSelector); }
+ void SetSelector(REveCaloDataSelector* iSelector);
REveCaloDataSelector* GetSelector() { return fSelector.get(); }
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override;
diff --git a/graf3d/eve7/src/REveCaloData.cxx b/graf3d/eve7/src/REveCaloData.cxx
index a5248f3c51d39..dc19d7d1be4a4 100644
--- a/graf3d/eve7/src/REveCaloData.cxx
+++ b/graf3d/eve7/src/REveCaloData.cxx
@@ -129,6 +129,9 @@ REveCaloData::REveCaloData(const char* n, const char* t):
// Constructor.
}
+REveCaloData::~REveCaloData() {}
+void REveCaloData::SetSelector(REveCaloDataSelector* iSelector) { fSelector.reset(iSelector); }
+
////////////////////////////////////////////////////////////////////////////////
/// Process newly selected cells with given select-record.
diff --git a/interpreter/cling/lib/Interpreter/CIFactory.cpp b/interpreter/cling/lib/Interpreter/CIFactory.cpp
index 385c03682575d..d33ce3a0039c5 100644
--- a/interpreter/cling/lib/Interpreter/CIFactory.cpp
+++ b/interpreter/cling/lib/Interpreter/CIFactory.cpp
@@ -61,14 +61,18 @@ using namespace cling;
namespace {
static constexpr unsigned CxxStdCompiledWith() {
+ // The value of __cplusplus in GCC < 14 is 202100L when -std=c++2b or
+ // -std=c++23 is specified, thus we relax the check to 202100L.
+#if __cplusplus >= 202100L
+ return 23;
+#elif __cplusplus > 201703L
+ return 20;
+#elif __cplusplus > 201402L
+ return 17;
// The value of __cplusplus in GCC < 5.0 (e.g. 4.9.3) when
// either -std=c++1y or -std=c++14 is specified is 201300L, which fails
// the test for C++14 or more (201402L) as previously specified.
// I would claim that the check should be relaxed to:
-#if __cplusplus > 201703L
- return 20;
-#elif __cplusplus > 201402L
- return 17;
#elif __cplusplus > 201103L || (defined(_WIN32) && _MSC_VER >= 1900)
return 14;
#elif __cplusplus >= 201103L
@@ -941,6 +945,8 @@ namespace {
// Sanity check that clang delivered the language standard requested
if (CompilerOpts.DefaultLanguage(&LangOpts)) {
switch (CxxStdCompiledWith()) {
+ case 23: assert(LangOpts.CPlusPlus23 && "Language version mismatch");
+ LLVM_FALLTHROUGH;
case 20: assert(LangOpts.CPlusPlus20 && "Language version mismatch");
LLVM_FALLTHROUGH;
case 17: assert(LangOpts.CPlusPlus17 && "Language version mismatch");
@@ -1343,6 +1349,7 @@ namespace {
// and by enforcing the std version now cling is telling clang what to
// do, rather than after clang has dedcuded a default.
switch (CxxStdCompiledWith()) {
+ case 23: argvCompile.emplace_back("-std=c++23"); break;
case 20: argvCompile.emplace_back("-std=c++20"); break;
case 17: argvCompile.emplace_back("-std=c++17"); break;
case 14: argvCompile.emplace_back("-std=c++14"); break;
diff --git a/interpreter/cling/lib/Interpreter/IncrementalCUDADeviceCompiler.cpp b/interpreter/cling/lib/Interpreter/IncrementalCUDADeviceCompiler.cpp
index ac6bd0e89444e..a492add8a01fc 100644
--- a/interpreter/cling/lib/Interpreter/IncrementalCUDADeviceCompiler.cpp
+++ b/interpreter/cling/lib/Interpreter/IncrementalCUDADeviceCompiler.cpp
@@ -117,6 +117,8 @@ namespace cling {
cppStdVersion = "-std=c++1z";
if (langOpts.CPlusPlus20)
cppStdVersion = "-std=c++20";
+ if (langOpts.CPlusPlus23)
+ cppStdVersion = "-std=c++23";
if (cppStdVersion.empty())
llvm::errs()
diff --git a/interpreter/cling/tools/Jupyter/kernel/clingkernel.py b/interpreter/cling/tools/Jupyter/kernel/clingkernel.py
index 17fcbd116ecc6..17b4d24f23d86 100644
--- a/interpreter/cling/tools/Jupyter/kernel/clingkernel.py
+++ b/interpreter/cling/tools/Jupyter/kernel/clingkernel.py
@@ -90,8 +90,8 @@ def _banner_default(self):
flush_interval = Float(0.25, config=True)
std = CaselessStrEnum(default_value='c++11',
- values = ['c++11', 'c++14', 'c++1z', 'c++17', 'c++20', 'c++2b'],
- help="C++ standard to use, either c++2b, c++20, c++17, c++1z, c++14 or c++11").tag(config=True);
+ values = ['c++11', 'c++14', 'c++1z', 'c++17', 'c++20', 'c++2b', 'c++23' ],
+ help="C++ standard to use, either c++23, c++2b, c++20, c++17, c++1z, c++14 or c++11").tag(config=True);
def __init__(self, **kwargs):
super(ClingKernel, self).__init__(**kwargs)
diff --git a/roofit/histfactory/inc/RooStats/HistFactory/HistRef.h b/roofit/histfactory/inc/RooStats/HistFactory/HistRef.h
index 7db9765004e0d..5b37542e6bdea 100644
--- a/roofit/histfactory/inc/RooStats/HistFactory/HistRef.h
+++ b/roofit/histfactory/inc/RooStats/HistFactory/HistRef.h
@@ -12,8 +12,7 @@
#define HISTFACTORY_HISTREF_H
#include <memory>
-
-class TH1;
+#include <TH1.h>
namespace RooStats{
namespace HistFactory {
diff --git a/roofit/roofitcore/inc/RooFit/Detail/NormalizationHelpers.h b/roofit/roofitcore/inc/RooFit/Detail/NormalizationHelpers.h
index c66954d0f0549..a849d7c2c8b4b 100644
--- a/roofit/roofitcore/inc/RooFit/Detail/NormalizationHelpers.h
+++ b/roofit/roofitcore/inc/RooFit/Detail/NormalizationHelpers.h
@@ -70,8 +70,7 @@ template <class T>
std::unique_ptr<T> compileForNormSet(T const &arg, RooArgSet const &normSet)
{
RooFit::Detail::CompileContext ctx{normSet};
- std::unique_ptr<RooAbsArg> head = arg.compileForNormSet(normSet, ctx);
- return std::unique_ptr<T>{static_cast<T *>(head.release())};
+ return std::unique_ptr<T>{static_cast<T *>(arg.compileForNormSet(normSet, ctx).release())};
}
} // namespace Detail

View File

@@ -35,7 +35,7 @@ inputs:
nix-output-monitor nix-tree ssh-to-age nix-inspect
# development
gdb try inputs.topInputs.plasma-manager.packages.${inputs.pkgs.system}.rc2nix rr hexo-cli gh nix-init hugo
(octodns.withProviders (_: with _; [ cloudflare ]))
(octodns.withProviders (_: with octodns-providers; [ cloudflare ]))
# stupid things
toilet lolcat localPackages.stickerpicker graph-easy
# office

View File

@@ -3,7 +3,9 @@ inputs:
options.nixos.packages.vasp = let inherit (inputs.lib) mkOption types; in mkOption
{
type = types.nullOr (types.submodule {});
default = if builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ] then {} else null;
# default = if builtins.elem inputs.config.nixos.model.type [ "desktop" "server" ] then {} else null;
# TODO: fix vasp
default = null;
};
# TODO: add more options to correctly configure VASP
config = let inherit (inputs.config.nixos.packages) vasp; in inputs.lib.mkIf (vasp != null)

View File

@@ -1,3 +1,4 @@
# TODO: use upstream packaging tools
inputs:
{
options.nixos.services.misskey.instances = let inherit (inputs.lib) mkOption types; in mkOption

View File

@@ -1,3 +1,4 @@
# TODO: fix libvirtd network
inputs:
{
options.nixos.services.nixvirt = let inherit (inputs.lib) mkOption types; in mkOption

View File

@@ -1,4 +1,5 @@
# port from nixpkgs#70dc536a
# TODO: update
inputs:
{
options.nixos.services.synapse.instances = let inherit (inputs.lib) mkOption types; in mkOption

View File

@@ -48,6 +48,7 @@ inputs:
xanmod-lts = inputs.pkgs.linuxPackages_xanmod;
xanmod-latest = inputs.pkgs.linuxPackages_xanmod_latest;
cachyos = inputs.pkgs.linuxPackages_cachyos;
# TODO: package cachyos-lts
cachyos-lts = inputs.pkgs.linuxPackages_cachyos_lts;
}.${kernel.variant};
kernelPatches =

View File

@@ -63,13 +63,19 @@ in platformConfig //
(prev: { patches = prev.patches or [] ++ [ ./telegram.patch ]; });
};
libvirt = prev.libvirt.overrideAttrs (prev: { patches = prev.patches or [] ++ [ ./libvirt.patch ]; });
root = prev.root.overrideAttrs (prev:
{
patches = prev.patches or [] ++ [ ./root.patch ];
cmakeFlags = prev.cmakeFlags ++ [ "-DCMAKE_CXX_STANDARD=23" ];
});
}
// (
let
source =
{
"pkgs-23.11" = "nixpkgs-23.11";
"pkgs-23.05" = "nixpkgs-23.05";
pkgs-2305 = "nixpkgs-2305";
pkgs-2311 = "nixpkgs-2311";
pkgs-2411 = "nixpkgs-2411";
pkgs-unstable =
{
source = "nixpkgs-unstable";
@@ -124,15 +130,40 @@ in platformConfig //
in builtins.listToAttrs (builtins.map
(name: { inherit name; value = packages name; }) (builtins.attrNames source))
)
# TODO: bring patch to upstream
// (inputs.lib.optionalAttrs (prev.stdenv.hostPlatform.avx512Support)
{ gsl = prev.gsl.overrideAttrs { doCheck = false; }; })
# // (inputs.lib.optionalAttrs (nixpkgs.march != null)
# {
# # -march=xxx cause embree build failed
# # https://github.com/embree/embree/issues/115
# embree = prev.embree.override { stdenv = final.genericPackages.stdenv; };
# simde = prev.simde.override { stdenv = final.genericPackages.stdenv; };
# })
// (inputs.lib.optionalAttrs (nixpkgs.march != null)
{
libinsane = prev.libinsane.overrideAttrs (prev:
{ nativeCheckInputs = builtins.filter (p: p.pname != "valgrind") prev.nativeCheckInputs; });
lib2geom = prev.lib2geom.overrideAttrs (prev: { doCheck = false; });
libreoffice-qt6-fresh = prev.libreoffice-qt6-fresh.override (prev:
{ unwrapped = prev.unwrapped.overrideAttrs (prev: { postPatch = prev.postPatch or "" +
''
sed -i '/CPPUNIT_TEST.testDubiousArrayFormulasFODS/d' sc/qa/unit/functions_array.cxx
'';});});
libreoffice-still = prev.libreoffice-still.override (prev:
{ unwrapped = prev.unwrapped.overrideAttrs (prev: { postPatch = prev.postPatch or "" +
''
sed -i '/CPPUNIT_TEST.testDubiousArrayFormulasFODS/d' sc/qa/unit/functions_array.cxx
'';});});
opencolorio = prev.opencolorio.overrideAttrs (prev: { doCheck = false; });
# TODO: maybe something really broken?
openvswitch = prev.openvswitch.overrideAttrs (prev: { doCheck = false; });
rapidjson = prev.rapidjson.overrideAttrs { doCheck = false; };
valkey = prev.valkey.overrideAttrs { doCheck = false; };
# -march=xxx cause embree build failed
# https://github.com/embree/embree/issues/115
embree = prev.embree.override { stdenv = final.genericPackages.stdenv; };
simde = prev.simde.override { stdenv = final.genericPackages.stdenv; };
pythonPackagesExtensions = prev.pythonPackagesExtensions or [] ++ [(final: prev:
{
scipy = prev.scipy.overridePythonAttrs (prev:
{ disabledTests = prev.disabledTests or [] ++ [ "test_hyp2f1" ]; });
# paperwork-backend = prev.paperwork-backend.overrideAttrs (prev: { doCheck = false; });
})];
})
# // (inputs.lib.optionalAttrs (nixpkgs.march == "silvermont")
# { c-blosc = prev.c-blosc.overrideAttrs { doCheck = false; }; })
)];

View File

@@ -5,7 +5,7 @@
# include <concurrencpp/concurrencpp.h>
# include <type_traits>
# include <fmt/format.h>
# include <magic_enum_all.hpp>
# include <magic_enum/magic_enum_all.hpp>
namespace biu
{

View File

@@ -2,7 +2,7 @@
# include <concurrencpp/concurrencpp.h>
# include <type_traits>
# include <fmt/format.h>
# include <magic_enum_all.hpp>
# include <magic_enum/magic_enum_all.hpp>
# include <biu/concepts.hpp>
namespace biu

View File

@@ -6,7 +6,7 @@
# include <boost/pfr.hpp>
# include <boost/pfr/core_name.hpp>
# include <nameof.hpp>
# include <magic_enum.hpp>
# include <magic_enum/magic_enum.hpp>
namespace YAML
{

View File

@@ -28,7 +28,7 @@ inputs: rec
{
inherit cppcoro nameof tgbot-cpp date;
src = inputs.topInputs.self.src.mirism-old;
nghttp2 = inputs.pkgs.callPackage "${inputs.topInputs."nixpkgs-23.05"}/pkgs/development/libraries/nghttp2"
nghttp2 = inputs.pkgs.callPackage "${inputs.topInputs.nixpkgs-2305}/pkgs/development/libraries/nghttp2"
{ enableAsioLib = true; stdenv = inputs.pkgs.gcc12Stdenv; };
stdenv = inputs.pkgs.gcc12Stdenv;
};
@@ -75,6 +75,8 @@ inputs: rec
biu = inputs.pkgs.callPackage ./biu
{
inherit nameof zpp-bits tgbot-cpp concurrencpp pocketfft;
# TODO: report glaze bug to upstream
inherit (inputs.pkgs.pkgs-2411) glaze;
stdenv = inputs.pkgs.clang18Stdenv;
boost = inputs.pkgs.boost186;
fmt = inputs.pkgs.fmt_11.overrideAttrs (prev: { patches = prev.patches or [] ++ [ ./biu/fmt.patch ]; });