Merge remote-tracking branch 'origin/master' into staging-next
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
utils,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -34,11 +35,11 @@ let
|
||||
DhcpDdns = cfg.dhcp-ddns.settings;
|
||||
}
|
||||
);
|
||||
|
||||
package = pkgs.kea;
|
||||
in
|
||||
{
|
||||
options.services.kea = with lib.types; {
|
||||
package = lib.mkPackageOption pkgs "kea" { };
|
||||
|
||||
ctrl-agent = lib.mkOption {
|
||||
description = ''
|
||||
Kea Control Agent configuration
|
||||
@@ -60,7 +61,7 @@ in
|
||||
type = nullOr path;
|
||||
default = null;
|
||||
description = ''
|
||||
Kea Control Agent configuration as a path, see <https://kea.readthedocs.io/en/kea-${package.version}/arm/agent.html>.
|
||||
Kea Control Agent configuration as a path, see <https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/agent.html>.
|
||||
|
||||
Takes preference over [settings](#opt-services.kea.ctrl-agent.settings).
|
||||
Most users should prefer using [settings](#opt-services.kea.ctrl-agent.settings) instead.
|
||||
@@ -71,7 +72,7 @@ in
|
||||
type = format.type;
|
||||
default = null;
|
||||
description = ''
|
||||
Kea Control Agent configuration as an attribute set, see <https://kea.readthedocs.io/en/kea-${package.version}/arm/agent.html>.
|
||||
Kea Control Agent configuration as an attribute set, see <https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/agent.html>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
@@ -99,7 +100,7 @@ in
|
||||
type = nullOr path;
|
||||
default = null;
|
||||
description = ''
|
||||
Kea DHCP4 configuration as a path, see <https://kea.readthedocs.io/en/kea-${package.version}/arm/dhcp4-srv.html>.
|
||||
Kea DHCP4 configuration as a path, see <https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/dhcp4-srv.html>.
|
||||
|
||||
Takes preference over [settings](#opt-services.kea.dhcp4.settings).
|
||||
Most users should prefer using [settings](#opt-services.kea.dhcp4.settings) instead.
|
||||
@@ -136,7 +137,7 @@ in
|
||||
];
|
||||
};
|
||||
description = ''
|
||||
Kea DHCP4 configuration as an attribute set, see <https://kea.readthedocs.io/en/kea-${package.version}/arm/dhcp4-srv.html>.
|
||||
Kea DHCP4 configuration as an attribute set, see <https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/dhcp4-srv.html>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
@@ -164,7 +165,7 @@ in
|
||||
type = nullOr path;
|
||||
default = null;
|
||||
description = ''
|
||||
Kea DHCP6 configuration as a path, see <https://kea.readthedocs.io/en/kea-${package.version}/arm/dhcp6-srv.html>.
|
||||
Kea DHCP6 configuration as a path, see <https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/dhcp6-srv.html>.
|
||||
|
||||
Takes preference over [settings](#opt-services.kea.dhcp6.settings).
|
||||
Most users should prefer using [settings](#opt-services.kea.dhcp6.settings) instead.
|
||||
@@ -202,7 +203,7 @@ in
|
||||
];
|
||||
};
|
||||
description = ''
|
||||
Kea DHCP6 configuration as an attribute set, see <https://kea.readthedocs.io/en/kea-${package.version}/arm/dhcp6-srv.html>.
|
||||
Kea DHCP6 configuration as an attribute set, see <https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/dhcp6-srv.html>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
@@ -230,7 +231,7 @@ in
|
||||
type = nullOr path;
|
||||
default = null;
|
||||
description = ''
|
||||
Kea DHCP-DDNS configuration as a path, see <https://kea.readthedocs.io/en/kea-${package.version}/arm/ddns.html>.
|
||||
Kea DHCP-DDNS configuration as a path, see <https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/ddns.html>.
|
||||
|
||||
Takes preference over [settings](#opt-services.kea.dhcp-ddns.settings).
|
||||
Most users should prefer using [settings](#opt-services.kea.dhcp-ddns.settings) instead.
|
||||
@@ -255,7 +256,7 @@ in
|
||||
};
|
||||
};
|
||||
description = ''
|
||||
Kea DHCP-DDNS configuration as an attribute set, see <https://kea.readthedocs.io/en/kea-${package.version}/arm/ddns.html>.
|
||||
Kea DHCP-DDNS configuration as an attribute set, see <https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/ddns.html>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
@@ -266,9 +267,10 @@ in
|
||||
config =
|
||||
let
|
||||
commonEnvironment = {
|
||||
KEA_CONTROL_SOCKET_DIR = "/run/kea";
|
||||
KEA_LOCKFILE_DIR = "/run/kea";
|
||||
KEA_PIDFILE_DIR = "/run/kea";
|
||||
# Allow hook scripts only when they originate from the system configuration
|
||||
KEA_HOOK_SCRIPTS_PATH = lib.mkDefault "/nix/store";
|
||||
# Allow hooks to originate from the configured package
|
||||
KEA_HOOKS_PATH = lib.mkDefault "${cfg.package}/lib/kea/hooks";
|
||||
};
|
||||
|
||||
commonServiceConfig = {
|
||||
@@ -291,7 +293,7 @@ in
|
||||
lib.mkIf (cfg.ctrl-agent.enable || cfg.dhcp4.enable || cfg.dhcp6.enable || cfg.dhcp-ddns.enable) (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = [ package ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
users.users.kea = {
|
||||
isSystemUser = true;
|
||||
@@ -314,7 +316,7 @@ in
|
||||
description = "Kea Control Agent";
|
||||
documentation = [
|
||||
"man:kea-ctrl-agent(8)"
|
||||
"https://kea.readthedocs.io/en/kea-${package.version}/arm/agent.html"
|
||||
"https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/agent.html"
|
||||
];
|
||||
|
||||
wants = [
|
||||
@@ -337,7 +339,14 @@ in
|
||||
];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${package}/bin/kea-ctrl-agent -c /etc/kea/ctrl-agent.conf ${lib.escapeShellArgs cfg.ctrl-agent.extraArgs}";
|
||||
ExecStart = utils.escapeSystemdExecArgs (
|
||||
[
|
||||
(lib.getExe' cfg.package "kea-ctrl-agent")
|
||||
"-c"
|
||||
"/etc/kea/ctrl-agent.conf"
|
||||
]
|
||||
++ cfg.ctrl-agent.extraArgs
|
||||
);
|
||||
KillMode = "process";
|
||||
Restart = "on-failure";
|
||||
}
|
||||
@@ -359,7 +368,7 @@ in
|
||||
description = "Kea DHCP4 Server";
|
||||
documentation = [
|
||||
"man:kea-dhcp4(8)"
|
||||
"https://kea.readthedocs.io/en/kea-${package.version}/arm/dhcp4-srv.html"
|
||||
"https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/dhcp4-srv.html"
|
||||
];
|
||||
|
||||
after = [
|
||||
@@ -380,7 +389,14 @@ in
|
||||
];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${package}/bin/kea-dhcp4 -c /etc/kea/dhcp4-server.conf ${lib.escapeShellArgs cfg.dhcp4.extraArgs}";
|
||||
ExecStart = utils.escapeSystemdExecArgs (
|
||||
[
|
||||
(lib.getExe' cfg.package "kea-dhcp4")
|
||||
"-c"
|
||||
"etc/kea/dhcp4-server.conf"
|
||||
]
|
||||
++ cfg.dhcp4.extraArgs
|
||||
);
|
||||
# Kea does not request capabilities by itself
|
||||
AmbientCapabilities = [
|
||||
"CAP_NET_BIND_SERVICE"
|
||||
@@ -409,7 +425,7 @@ in
|
||||
description = "Kea DHCP6 Server";
|
||||
documentation = [
|
||||
"man:kea-dhcp6(8)"
|
||||
"https://kea.readthedocs.io/en/kea-${package.version}/arm/dhcp6-srv.html"
|
||||
"https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/dhcp6-srv.html"
|
||||
];
|
||||
|
||||
after = [
|
||||
@@ -430,7 +446,14 @@ in
|
||||
];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${package}/bin/kea-dhcp6 -c /etc/kea/dhcp6-server.conf ${lib.escapeShellArgs cfg.dhcp6.extraArgs}";
|
||||
ExecStart = utils.escapeSystemdExecArgs (
|
||||
[
|
||||
(lib.getExe' cfg.package "kea-dhcp6")
|
||||
"-c"
|
||||
"/etc/kea/dhcp6-server.conf"
|
||||
]
|
||||
++ cfg.dhcp6.extraArgs
|
||||
);
|
||||
# Kea does not request capabilities by itself
|
||||
AmbientCapabilities = [
|
||||
"CAP_NET_BIND_SERVICE"
|
||||
@@ -457,7 +480,7 @@ in
|
||||
description = "Kea DHCP-DDNS Server";
|
||||
documentation = [
|
||||
"man:kea-dhcp-ddns(8)"
|
||||
"https://kea.readthedocs.io/en/kea-${package.version}/arm/ddns.html"
|
||||
"https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/ddns.html"
|
||||
];
|
||||
|
||||
wants = [ "network-online.target" ];
|
||||
@@ -476,7 +499,14 @@ in
|
||||
];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${package}/bin/kea-dhcp-ddns -c /etc/kea/dhcp-ddns.conf ${lib.escapeShellArgs cfg.dhcp-ddns.extraArgs}";
|
||||
ExecStart = utils.escapeSystemdExecArgs (
|
||||
[
|
||||
(lib.getExe' cfg.package "kea-dhcp-ddns")
|
||||
"-c"
|
||||
"/etc/kea/dhcp-ddns.conf"
|
||||
]
|
||||
++ cfg.dhcp-ddns.extraArgs
|
||||
);
|
||||
AmbientCapabilities = [
|
||||
"CAP_NET_BIND_SERVICE"
|
||||
];
|
||||
|
||||
@@ -22,17 +22,17 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "aaaaxy";
|
||||
version = "1.6.257";
|
||||
version = "1.6.271";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "divVerent";
|
||||
repo = "aaaaxy";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-l+4nlL8gUnLoBbKWlwOiis3s8svKMq9IjrbKyaBE0kk=";
|
||||
hash = "sha256-/nSJ1FT9FE856yrupbouRzqpRzZhKfYAq1fVBBvMVmY=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
vendorHash = "sha256-iP/7WQZ+BNqtoigRADKlYGEAEZpzSKttY4lVq7v8gR8=";
|
||||
vendorHash = "sha256-DJvlyfCynz+M5BQ4XDYcdzb3QP5ycDPcF4B+fQ4FRRA=";
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
|
||||
@@ -14,16 +14,16 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "argc";
|
||||
version = "1.22.0";
|
||||
version = "1.23.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sigoden";
|
||||
repo = "argc";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-sviGDwxbCBsNY5viV7Qim6B/COd1Uz0Wj/6n/Ge+A50=";
|
||||
hash = "sha256-in2ymxiSZbs3wZwo/aKfu11x8SLx4OHOoa/tVxr3FyM=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-uyUwmTDa1RcgQbc/6wMwRK6932CatuGMr0FPd2rAufk=";
|
||||
cargoHash = "sha256-2UmI9CMa130T7ML9iVNQ8Zh/stiFg05eBtF1sprmwk8=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ] ++ lib.optional (!canExecuteHost) buildPackages.argc;
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-hack";
|
||||
version = "0.6.36";
|
||||
version = "0.6.37";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
hash = "sha256-AO4bB+aqAzGxFyPhuwaEQDAbL+fCIWY2rv3QFdBAq7s=";
|
||||
hash = "sha256-OlWSyp3et/48x5lRE14pIny8HHQcgOV2f9mI9hcj8K4=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-fWKrHo5WdeEhnPxATbZ9Cjv+aiSxOh0pRDeeHHDk8u4=";
|
||||
cargoHash = "sha256-1FgFHnNCEGoBUbH+Uk67W9ufsGtr9uGdzJz0xZuPQ9U=";
|
||||
|
||||
# some necessary files are absent in the crate version
|
||||
doCheck = false;
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-mutants";
|
||||
version = "25.2.0";
|
||||
version = "25.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sourcefrog";
|
||||
repo = "cargo-mutants";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-//OUOf4RUM69tHBB17p4OSs/cCvv0HnDjyRUzUZc8KE=";
|
||||
hash = "sha256-VDXI/pR7lmIMrsHx9E+oWp0PPUcl83Hc98z6Sh18Hsc=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-QZrpH0nJ6a9AQAKNp/tkT1hpkUMWa2kh8kek2rY8wO4=";
|
||||
cargoHash = "sha256-fTGIFD6V7L3erzi2RexR9XJNIV/UTu8vwFnrNpeFE4A=";
|
||||
|
||||
# too many tests require internet access
|
||||
doCheck = false;
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-shuttle";
|
||||
version = "0.56.0";
|
||||
version = "0.56.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shuttle-hq";
|
||||
repo = "shuttle";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Fr31BNTI8pVXHSSu46XPvlb0ic/S011OLWsLEfAZI4M=";
|
||||
hash = "sha256-IBQExHPJUE16syyRkPOgh7jHONp1XDsAfCYLvZ6CLPs=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-2YnwBAt2M2MkMhraKlk+BXxaNQ+iZSKzlUER1GBPbCI=";
|
||||
cargoHash = "sha256-i6Xof5uzVOmdDFZw/J/x8eOqH/iAt2ZJXkOABLSR8Ss=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ python3Packages.buildPythonApplication rec {
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
pygobject3
|
||||
f3d_egl
|
||||
f3d
|
||||
];
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
@@ -9,10 +9,7 @@
|
||||
libXt,
|
||||
openusd,
|
||||
tbb,
|
||||
# There is a f3d overridden with EGL enabled vtk in top-level/all-packages.nix
|
||||
# compiling with EGL enabled vtk will result in f3d running in headless mode
|
||||
# See https://github.com/NixOS/nixpkgs/pull/324022. This may change later.
|
||||
vtk_9,
|
||||
vtk,
|
||||
autoPatchelfHook,
|
||||
python3Packages,
|
||||
opencascade-occt,
|
||||
@@ -50,7 +47,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
vtk_9
|
||||
vtk
|
||||
opencascade-occt
|
||||
assimp
|
||||
fontconfig
|
||||
|
||||
@@ -17,17 +17,17 @@ let
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "forgejo-runner";
|
||||
version = "8.0.0";
|
||||
version = "8.0.1";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "code.forgejo.org";
|
||||
owner = "forgejo";
|
||||
repo = "runner";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ORFmCvKFbNQ1MGHifNhPmrPDep+WE603+xkIqMF/w6g=";
|
||||
hash = "sha256-6FTJYs1dqIAHPxMzRNOHHZQv4be9LaR1wxMJsW3t5kg=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-4TX1ol2WwvZ4WYIzLFfVlYkcT5eLduESc+jg4Ysas2o=";
|
||||
vendorHash = "sha256-NykeBR2dnWQaqJuY73i9KLIqehLHniaMqf9oTqUDstQ=";
|
||||
|
||||
# See upstream Makefile
|
||||
# https://code.forgejo.org/forgejo/runner/src/branch/main/Makefile
|
||||
@@ -39,7 +39,7 @@ buildGoModule rec {
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X runner.forgejo.org/internal/pkg/ver.version=${src.rev}"
|
||||
"-X code.forgejo.org/forgejo/runner/internal/pkg/ver.version=${src.rev}"
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
@@ -49,7 +49,7 @@ buildGoModule rec {
|
||||
postInstall = ''
|
||||
# fix up go-specific executable naming derived from package name, upstream
|
||||
# also calls it `forgejo-runner`
|
||||
mv $out/bin/runner.forgejo.org $out/bin/forgejo-runner
|
||||
mv $out/bin/runner $out/bin/forgejo-runner
|
||||
# provide old binary name for compatibility
|
||||
ln -s $out/bin/forgejo-runner $out/bin/act_runner
|
||||
'';
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 24ab9b5bd7..8f44076cf7 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -1118,10 +1118,6 @@ top_docs = [
|
||||
]
|
||||
install_data(top_docs, install_dir: DATADIR / 'doc/kea')
|
||||
|
||||
-install_emptydir(LOGDIR)
|
||||
-install_emptydir(RUNSTATEDIR)
|
||||
-install_emptydir(SHAREDSTATEDIR)
|
||||
-
|
||||
# Meson is annoying with its opinionated alteration of certain paths based on whether prefix is default or not.
|
||||
# So we revert what it does..
|
||||
# In case prefix is default, install to hardcoded path.
|
||||
@@ -1,34 +0,0 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index a81f4cc..5d61407 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -173,18 +173,6 @@ cppcheck:
|
||||
docs:
|
||||
$(MAKE) -C doc/sphinx
|
||||
|
||||
-
|
||||
-# These steps are necessary during installation. chmod is for reinstallation/upgrade.
|
||||
-install-exec-hook:
|
||||
- mkdir -m 750 -p "$(DESTDIR)${localstatedir}/lib/${PACKAGE_NAME}"
|
||||
- chmod 750 "$(DESTDIR)${localstatedir}/lib/${PACKAGE_NAME}"
|
||||
- mkdir -m 750 -p "$(DESTDIR)${localstatedir}/log/${PACKAGE_NAME}"
|
||||
- chmod 750 "$(DESTDIR)${localstatedir}/log/${PACKAGE_NAME}"
|
||||
- mkdir -m 750 -p "$(DESTDIR)${runstatedir}/${PACKAGE_NAME}"
|
||||
- chmod 750 "$(DESTDIR)${runstatedir}/${PACKAGE_NAME}"
|
||||
- mkdir -m 750 -p "$(DESTDIR)${sysconfdir}/${PACKAGE_NAME}"
|
||||
- chmod 750 "$(DESTDIR)${sysconfdir}/${PACKAGE_NAME}"
|
||||
-
|
||||
EXTRA_DIST = tools/path_replacer.sh
|
||||
EXTRA_DIST += tools/mk_cfgrpt.sh
|
||||
|
||||
diff --git a/src/lib/dhcpsrv/Makefile.am b/src/lib/dhcpsrv/Makefile.am
|
||||
index 7e0f3c4..08c53d8 100644
|
||||
--- a/src/lib/dhcpsrv/Makefile.am
|
||||
+++ b/src/lib/dhcpsrv/Makefile.am
|
||||
@@ -420,6 +420,3 @@ libkea_dhcpsrv_parsers_include_HEADERS = \
|
||||
parsers/shared_networks_list_parser.h \
|
||||
parsers/simple_parser4.h \
|
||||
parsers/simple_parser6.h
|
||||
-
|
||||
-install-data-local:
|
||||
- $(mkinstalldirs) $(DESTDIR)$(dhcp_data_dir)
|
||||
@@ -4,87 +4,108 @@
|
||||
fetchurl,
|
||||
|
||||
# build time
|
||||
autoreconfHook,
|
||||
bison,
|
||||
flex,
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
python3Packages,
|
||||
|
||||
# runtime
|
||||
withMysql ? stdenv.buildPlatform.system == stdenv.hostPlatform.system,
|
||||
withPostgres ? stdenv.buildPlatform.system == stdenv.hostPlatform.system,
|
||||
boost186,
|
||||
libmysqlclient,
|
||||
boost,
|
||||
log4cplus,
|
||||
openssl,
|
||||
libpq,
|
||||
python3,
|
||||
withKrb5 ? true,
|
||||
krb5,
|
||||
withMysql ? stdenv.buildPlatform.system == stdenv.hostPlatform.system,
|
||||
libmysqlclient,
|
||||
withPostgresql ? stdenv.buildPlatform.system == stdenv.hostPlatform.system,
|
||||
libpq,
|
||||
|
||||
# tests
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "kea";
|
||||
version = "2.6.3"; # only even minor versions are stable
|
||||
version = "3.0.0"; # only even minor versions are stable
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ftp.isc.org/isc/${pname}/${version}/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-ACQaWVX/09IVosCYxFJ/nX9LIDGIsnb5o2JQ3T2d1hI=";
|
||||
url = "https://ftp.isc.org/isc/kea/${finalAttrs.version}/kea-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-v5Y9HhCVHYxXDGBCr8zyfHCdReA4E70mOde7HPxP7nY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./dont-create-var.patch
|
||||
./dont-create-system-paths.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./src/bin/keactrl/Makefile.am --replace-fail '@sysconfdir@' "$out/etc"
|
||||
# darwin special-casing just causes trouble
|
||||
substituteInPlace ./m4macros/ax_crypto.m4 --replace-fail 'apple-darwin' 'nope'
|
||||
patchShebangs \
|
||||
scripts/grabber.py \
|
||||
doc/sphinx/*.sh.in
|
||||
'';
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"doc"
|
||||
"man"
|
||||
"python"
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-perfdhcp"
|
||||
"--enable-shell"
|
||||
"--localstatedir=/var"
|
||||
"--with-openssl=${lib.getDev openssl}"
|
||||
]
|
||||
++ lib.optional withPostgres "--with-pgsql=${libpq.pg_config}/bin/pg_config"
|
||||
++ lib.optional withMysql "--with-mysql=${lib.getDev libmysqlclient}/bin/mysql_config";
|
||||
mesonFlags = [
|
||||
(lib.mesonOption "crypto" "openssl")
|
||||
(lib.mesonEnable "krb5" withKrb5)
|
||||
(lib.mesonEnable "mysql" withMysql)
|
||||
(lib.mesonEnable "netconf" false) # missing libyang-cpp, sysinfo, libsysrepo-cpp
|
||||
(lib.mesonEnable "postgresql" withPostgresql)
|
||||
(lib.mesonOption "localstatedir" "/var")
|
||||
(lib.mesonOption "runstatedir" "/run")
|
||||
];
|
||||
|
||||
postConfigure = ''
|
||||
# Mangle embedded paths to dev-only inputs.
|
||||
sed -e "s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i config.report
|
||||
for file in config.report meson-info/intro*.json; do
|
||||
sed -e "s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i "$file"
|
||||
done
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
bison
|
||||
flex
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
python3
|
||||
]
|
||||
++ (with python3Packages; [
|
||||
sphinxHook
|
||||
sphinx
|
||||
sphinx-rtd-theme
|
||||
]);
|
||||
|
||||
sphinxBuilders = [
|
||||
"html"
|
||||
"man"
|
||||
];
|
||||
sphinxRoot = "doc/sphinx";
|
||||
|
||||
buildInputs = [
|
||||
boost186 # does not build with 1.87 yet, see https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2523
|
||||
libmysqlclient
|
||||
boost
|
||||
log4cplus
|
||||
openssl
|
||||
python3
|
||||
]
|
||||
++ lib.optionals withMysql [
|
||||
libmysqlclient
|
||||
]
|
||||
++ lib.optionals withPostgresql [
|
||||
libpq
|
||||
]
|
||||
++ lib.optionals withKrb5 [
|
||||
krb5
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
postBuild = ''
|
||||
ninja doc
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
mkdir -p $python/lib
|
||||
mv $out/lib/python* $python/lib/
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
kea = nixosTests.kea;
|
||||
@@ -98,9 +119,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
meta = {
|
||||
# error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
changelog = "https://downloads.isc.org/isc/kea/${version}/Kea-${version}-ReleaseNotes.txt";
|
||||
changelog = "https://gitlab.isc.org/isc-projects/kea/-/wikis/Release-Notes/release-notes-${finalAttrs.version}";
|
||||
homepage = "https://kea.isc.org/";
|
||||
description = "High-performance, extensible DHCP server by ISC";
|
||||
longDescription = ''
|
||||
@@ -117,4 +136,4 @@ stdenv.mkDerivation rec {
|
||||
hexa
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "oxlint";
|
||||
version = "1.3.0";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "oxc-project";
|
||||
repo = "oxc";
|
||||
tag = "oxlint_v${version}";
|
||||
hash = "sha256-+K8hc6uU/p/hT3bkaGPZpVcK9itSGJM9Mdhfw3DSZJw=";
|
||||
hash = "sha256-URgz9k89WgYfCu9OlNCZk5wRt8upt58rIxFWa90L+OQ=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-D0YEodCzBpf7g3VnKyydEDtjzGUu+XsGc2BpXU4CR6Q=";
|
||||
cargoHash = "sha256-s1UXL+y/BISOnPJmdpQFztYRd5je9C8jcc+e+iWtRuU=";
|
||||
|
||||
buildInputs = [
|
||||
rust-jemalloc-sys
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "patch2pr";
|
||||
version = "0.36.0";
|
||||
version = "0.37.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bluekeyes";
|
||||
repo = "patch2pr";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-KaU77UYJJqcTJZrFPiqcdzYIVoih6oSeaPWiQdDiZ2s=";
|
||||
hash = "sha256-dijSa6BXV8hXuRDeXIHcijPzQKFkmATrlAX0uiDDYjo=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-MO6LrUvSu7pYidtjaDgjIEAxoIKM/U9hcePZr336Mbw=";
|
||||
vendorHash = "sha256-QEgGq5/JQUIWWmJKoQ832eKhiF5xF8Jivpn1uFDERTA=";
|
||||
|
||||
ldflags = [
|
||||
"-X main.version=${version}"
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "runme";
|
||||
version = "3.14.2";
|
||||
version = "3.15.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "runmedev";
|
||||
repo = "runme";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-s+GhfbxPLiIE0PT08srj+McUAhhhlG0JOOoWJyiMAeo=";
|
||||
hash = "sha256-mVqDCHCZn0hbhNZjMyD+B52ZjG5GTplz9FNJoA8DY8A=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-ixAd+ItQ1kLZZxQQNKcRH2dxQvnX/gpja930SSREzzA=";
|
||||
vendorHash = "sha256-AXjU0nhSSdyfdYofjRI0wtF+nEsZmqLjr5j7FzY+x94=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "snort";
|
||||
version = "3.9.1.0";
|
||||
version = "3.9.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "snort3";
|
||||
repo = "snort3";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-Ciseo0mYmgyfZB44zeudEst98XnM8E2vTG5J6snA3q0=";
|
||||
hash = "sha256-LVAsCps5XLsj4acYWI42qdbvX6h9JTJJfM33FvVfWK0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sticky";
|
||||
version = "1.24";
|
||||
version = "1.25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = "sticky";
|
||||
rev = version;
|
||||
hash = "sha256-Mj14S4M7NMQE17SN8uED4UIJN6nwTo3E+D3j0tGKXc4=";
|
||||
hash = "sha256-lM9R89CNj8ZXeOciwn/ax9wcsf3J4yPmzrgAntp8Fsg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "telegraf";
|
||||
version = "1.35.2";
|
||||
version = "1.35.3";
|
||||
|
||||
subPackages = [ "cmd/telegraf" ];
|
||||
|
||||
@@ -18,10 +18,10 @@ buildGoModule rec {
|
||||
owner = "influxdata";
|
||||
repo = "telegraf";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-x1PUDe5sMtg7VjFmjZ1rtk1SjglkEtbhVOfDYL/kikA=";
|
||||
hash = "sha256-EwO7dvPJkLCxO9xZCW7gX57tCO7RIpJ23vqwOkMOVnw=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-pTJqf00JdF+6ixU23zBLrNZquB02fP+BBX6JXgxthSw=";
|
||||
vendorHash = "sha256-DHtgN8yf+4YYrDJKnFasICScYqq65iPGi7pFoxQawv8=";
|
||||
proxyVendor = true;
|
||||
|
||||
ldflags = [
|
||||
|
||||
@@ -34,13 +34,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Fix vtk deprecated api, See https://docs.vtk.org/en/latest/release_details/9.3.html#id13.
|
||||
# Upstream mailing list: https://sourceforge.net/p/gdcm/mailman/message/59197515.
|
||||
./fix-vtk-deprecated-api.patch
|
||||
]
|
||||
++ lib.optionals (lib.versionOlder vtk.version "9.3") [
|
||||
(fetchpatch2 {
|
||||
url = "https://github.com/malaterre/GDCM/commit/3be6c2fa0945c91889bcf06e8c20e88f69692dd5.patch?full_index=1";
|
||||
hash = "sha256-Yt5f4mxhP5n+L0A/CRq3CxKCqUT7LZ8uKdbCf9P71Zc=";
|
||||
revert = true;
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import ./generic.nix {
|
||||
majorVersion = "9.2";
|
||||
minorVersion = "6";
|
||||
sourceSha256 = "sha256-BvyNScTlb0mMQPyzilY+2NTsMTWNAQHomI8LtNU53RI=";
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
callPackage,
|
||||
fetchpatch2,
|
||||
}:
|
||||
let
|
||||
mkVtk = initArgs: callPackage (import ./generic.nix initArgs) { };
|
||||
in
|
||||
{
|
||||
vtk_9_5 = mkVtk {
|
||||
version = "9.5.0";
|
||||
sourceSha256 = "sha256-BK6GJGuVV8a2GvvFNKbfCZJE+8jzk3+C5rwFcJU6+H0=";
|
||||
patches = [
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/issues/19699
|
||||
(fetchpatch2 {
|
||||
url = "https://gitlab.kitware.com/vtk/vtk/-/commit/6b4f7b853675c63e4831c366ca8f78e320c1bfb5.diff";
|
||||
hash = "sha256-hWJc5RxW6iK+W/rTxp2GUWKcm/2+oxbP5nVZ0EUSKHE=";
|
||||
})
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/issues/19705
|
||||
(fetchpatch2 {
|
||||
url = "https://gitlab.kitware.com/vtk/vtk/-/commit/ce10dfe82ffa19c8108885625a6f8b3f980bed3b.diff";
|
||||
hash = "sha256-kyPM0whL4WeaV27sNM1fbbs5kwMYn+9E561HtvnwHRc=";
|
||||
})
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/12262
|
||||
(fetchpatch2 {
|
||||
url = "https://gitlab.kitware.com/vtk/vtk/-/commit/c0e0f793e6adf740f5b1c91ac330afdbc2a03b72.diff";
|
||||
hash = "sha256-BinSv8sPqpAEcgkn8trnCPv2snR9MGcA8rkVflAhc5w=";
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,145 +1,347 @@
|
||||
{
|
||||
majorVersion,
|
||||
minorVersion,
|
||||
version,
|
||||
sourceSha256,
|
||||
patchesToFetch ? [ ],
|
||||
patches ? [ ],
|
||||
}:
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
newScope,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
cmake,
|
||||
libGLU,
|
||||
libGL,
|
||||
libX11,
|
||||
xorgproto,
|
||||
libXt,
|
||||
pkg-config,
|
||||
|
||||
# common dependencies
|
||||
tk,
|
||||
mpi,
|
||||
python3Packages,
|
||||
catalyst,
|
||||
cli11,
|
||||
boost,
|
||||
eigen,
|
||||
verdict,
|
||||
double-conversion,
|
||||
|
||||
# common data libraries
|
||||
lz4,
|
||||
xz,
|
||||
zlib,
|
||||
pugixml,
|
||||
expat,
|
||||
jsoncpp,
|
||||
libxml2,
|
||||
exprtk,
|
||||
utf8cpp,
|
||||
libarchive,
|
||||
nlohmann_json,
|
||||
|
||||
# filters
|
||||
openturns,
|
||||
openslide,
|
||||
|
||||
# io modules
|
||||
cgns,
|
||||
adios2,
|
||||
libLAS,
|
||||
libgeotiff,
|
||||
laszip_2,
|
||||
gdal,
|
||||
pdal,
|
||||
alembic,
|
||||
imath,
|
||||
openvdb,
|
||||
c-blosc,
|
||||
unixODBC,
|
||||
postgresql,
|
||||
libmysqlclient,
|
||||
ffmpeg,
|
||||
libjpeg,
|
||||
libpng,
|
||||
libtiff,
|
||||
fetchpatch,
|
||||
enableQt ? false,
|
||||
qtx11extras,
|
||||
qttools,
|
||||
qtdeclarative,
|
||||
qtEnv,
|
||||
enablePython ? false,
|
||||
python ? throw "vtk: Python support requested, but no python interpreter was given.",
|
||||
enableEgl ? false,
|
||||
proj,
|
||||
sqlite,
|
||||
libogg,
|
||||
libharu,
|
||||
libtheora,
|
||||
hdf5,
|
||||
netcdf,
|
||||
opencascade-occt,
|
||||
|
||||
# threading
|
||||
tbb,
|
||||
llvmPackages,
|
||||
|
||||
# rendering
|
||||
viskores,
|
||||
freetype,
|
||||
fontconfig,
|
||||
libX11,
|
||||
libXfixes,
|
||||
libXrender,
|
||||
libXcursor,
|
||||
gl2ps,
|
||||
libGL,
|
||||
qt5,
|
||||
qt6,
|
||||
|
||||
# custom options
|
||||
qtVersion ? null,
|
||||
# To avoid conflicts between the propagated vtkPackages.hdf5
|
||||
# and the input hdf5 used by most downstream packages,
|
||||
# we set mpiSupport to false by default.
|
||||
mpiSupport ? false,
|
||||
pythonSupport ? false,
|
||||
|
||||
# passthru.tests
|
||||
testers,
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) optionalString optionals;
|
||||
|
||||
version = "${majorVersion}.${minorVersion}";
|
||||
pythonMajor = lib.substring 0 1 python.pythonVersion;
|
||||
qtPackages =
|
||||
if (isNull qtVersion) then
|
||||
null
|
||||
else if (qtVersion == "6") then
|
||||
qt6
|
||||
else if (qtVersion == "5") then
|
||||
qt5
|
||||
else
|
||||
throw ''qtVersion must be "5", "6" or null'';
|
||||
vtkPackages = lib.makeScope newScope (self: {
|
||||
inherit
|
||||
tbb
|
||||
mpi
|
||||
mpiSupport
|
||||
python3Packages
|
||||
pythonSupport
|
||||
;
|
||||
|
||||
hdf5 = hdf5.override {
|
||||
inherit mpi mpiSupport;
|
||||
cppSupport = !mpiSupport;
|
||||
};
|
||||
openvdb = self.callPackage openvdb.override { };
|
||||
netcdf = self.callPackage netcdf.override { };
|
||||
catalyst = self.callPackage catalyst.override { };
|
||||
adios2 = self.callPackage adios2.override { };
|
||||
cgns = self.callPackage cgns.override { };
|
||||
viskores = self.callPackage viskores.override { };
|
||||
});
|
||||
vtkBool = feature: bool: lib.cmakeFeature feature "${if bool then "YES" else "NO"}";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "vtk" + optionalString enableEgl "-egl" + optionalString enableQt "-qvtk";
|
||||
inherit version;
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "vtk";
|
||||
inherit version patches;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.vtk.org/files/release/${majorVersion}/VTK-${version}.tar.gz";
|
||||
sha256 = sourceSha256;
|
||||
url = "https://www.vtk.org/files/release/${lib.versions.majorMinor finalAttrs.version}/VTK-${finalAttrs.version}.tar.gz";
|
||||
hash = sourceSha256;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config # required for finding MySQl
|
||||
]
|
||||
++ lib.optional pythonSupport python3Packages.python
|
||||
++ lib.optional (
|
||||
pythonSupport && stdenv.buildPlatform == stdenv.hostPlatform
|
||||
) python3Packages.pythonImportsCheckHook;
|
||||
|
||||
buildInputs = [
|
||||
libLAS
|
||||
libgeotiff
|
||||
laszip_2
|
||||
gdal
|
||||
pdal
|
||||
alembic
|
||||
imath
|
||||
c-blosc
|
||||
unixODBC
|
||||
postgresql
|
||||
libmysqlclient
|
||||
ffmpeg
|
||||
opencascade-occt
|
||||
fontconfig
|
||||
openturns
|
||||
libarchive
|
||||
libGL
|
||||
vtkPackages.openvdb
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
libXfixes
|
||||
libXrender
|
||||
libXcursor
|
||||
]
|
||||
++ lib.optional (!(isNull qtPackages)) qtPackages.qttools
|
||||
++ lib.optional mpiSupport mpi
|
||||
++ lib.optional pythonSupport tk;
|
||||
|
||||
# propagated by vtk-config.cmake
|
||||
propagatedBuildInputs = [
|
||||
eigen
|
||||
boost
|
||||
verdict
|
||||
double-conversion
|
||||
freetype
|
||||
lz4
|
||||
xz
|
||||
zlib
|
||||
expat
|
||||
exprtk
|
||||
pugixml
|
||||
jsoncpp
|
||||
libxml2
|
||||
utf8cpp
|
||||
nlohmann_json
|
||||
libjpeg
|
||||
libpng
|
||||
libtiff
|
||||
proj
|
||||
sqlite
|
||||
libogg
|
||||
libharu
|
||||
libtheora
|
||||
cli11
|
||||
openslide
|
||||
vtkPackages.hdf5
|
||||
vtkPackages.cgns
|
||||
vtkPackages.adios2
|
||||
vtkPackages.netcdf
|
||||
vtkPackages.catalyst
|
||||
vtkPackages.viskores
|
||||
vtkPackages.tbb
|
||||
]
|
||||
++ optionals enableQt [
|
||||
(qtEnv "qvtk-qt-env" [
|
||||
qtx11extras
|
||||
qttools
|
||||
qtdeclarative
|
||||
])
|
||||
++ lib.optionals stdenv.cc.isClang [
|
||||
llvmPackages.openmp
|
||||
]
|
||||
++ optionals stdenv.hostPlatform.isLinux [
|
||||
libGLU
|
||||
xorgproto
|
||||
libXt
|
||||
]
|
||||
++ optionals enablePython [
|
||||
python
|
||||
];
|
||||
propagatedBuildInputs = optionals stdenv.hostPlatform.isLinux [
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
libX11
|
||||
libGL
|
||||
gl2ps
|
||||
]
|
||||
# create meta package providing dist-info for python3Pacakges.vtk that common cmake build does not do
|
||||
++ lib.optionals pythonSupport [
|
||||
(python3Packages.mkPythonMetaPackage {
|
||||
inherit (finalAttrs) pname version meta;
|
||||
dependencies =
|
||||
with python3Packages;
|
||||
[
|
||||
numpy
|
||||
wslink
|
||||
matplotlib
|
||||
]
|
||||
++ lib.optional mpiSupport (mpi4py.override { inherit mpi; });
|
||||
})
|
||||
];
|
||||
# see https://github.com/NixOS/nixpkgs/pull/178367#issuecomment-1238827254
|
||||
|
||||
patches = map fetchpatch patchesToFetch;
|
||||
|
||||
# GCC 13: error: 'int64_t' in namespace 'std' does not name a type
|
||||
postPatch = ''
|
||||
sed '1i#include <cstdint>' \
|
||||
-i ThirdParty/libproj/vtklibproj/src/proj_json_streaming_writer.hpp \
|
||||
-i IO/Image/vtkSEPReader.h
|
||||
''
|
||||
+ optionalString stdenv.hostPlatform.isDarwin ''
|
||||
sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-${majorVersion}|' ./Parallel/Core/CMakeLists.txt
|
||||
sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/' ./ThirdParty/libxml2/vtklibxml2/xmlschemas.c
|
||||
sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/g' ./ThirdParty/libxml2/vtklibxml2/xpath.c
|
||||
# wrapper script calls qmlplugindump, crashes due to lack of minimal platform plugin
|
||||
# Could not find the Qt platform plugin "minimal" in ""
|
||||
preConfigure = lib.optionalString (qtVersion == "5") ''
|
||||
export QT_PLUGIN_PATH=${lib.getBin qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}
|
||||
'';
|
||||
|
||||
env = {
|
||||
CMAKE_PREFIX_PATH = "${lib.getDev openvdb}/lib/cmake/OpenVDB";
|
||||
NIX_LDFLAGS = "-L${lib.getLib libmysqlclient}/lib/mariadb";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_INCLUDEDIR" "include")
|
||||
|
||||
# vtk common configure options
|
||||
(lib.cmakeBool "VTK_DISPATCH_SOA_ARRAYS" true)
|
||||
(lib.cmakeBool "VTK_ENABLE_CATALYST" true)
|
||||
(lib.cmakeBool "VTK_WRAP_SERIALIZATION" true)
|
||||
(lib.cmakeBool "VTK_BUILD_ALL_MODULES" true)
|
||||
(lib.cmakeBool "VTK_VERSIONED_INSTALL" false)
|
||||
(lib.cmakeBool "VTK_SMP_ENABLE_OPENMP" true)
|
||||
(lib.cmakeFeature "VTK_SMP_IMPLEMENTATION_TYPE" "TBB")
|
||||
|
||||
# use system packages if possible
|
||||
(lib.cmakeBool "VTK_USE_EXTERNAL" true)
|
||||
(lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_fast_float" false) # required version incompatible
|
||||
(lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_pegtl" false) # required version incompatible
|
||||
(lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_ioss" false) # missing in nixpkgs
|
||||
(lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_token" false) # missing in nixpkgs
|
||||
(lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_fmt" false) # prefer vendored fmt
|
||||
(lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_scn" false) # missing in nixpkgs
|
||||
(lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_gl2ps" stdenv.hostPlatform.isLinux) # external gl2ps causes failure linking to macOS OpenGL.framework
|
||||
|
||||
# Rendering
|
||||
(vtkBool "VTK_MODULE_ENABLE_VTK_RenderingRayTracing" false) # ospray
|
||||
(vtkBool "VTK_MODULE_ENABLE_VTK_RenderingOpenXR" false) # openxr
|
||||
(vtkBool "VTK_MODULE_ENABLE_VTK_RenderingOpenVR" false) # openvr
|
||||
(vtkBool "VTK_MODULE_ENABLE_VTK_RenderingAnari" false) # anari
|
||||
|
||||
# qtSupport
|
||||
(vtkBool "VTK_GROUP_ENABLE_Qt" (!(isNull qtPackages)))
|
||||
(lib.cmakeFeature "VTK_QT_VERSION" "Auto") # will search for Qt6 first
|
||||
|
||||
# pythonSupport
|
||||
(lib.cmakeBool "VTK_USE_TK" pythonSupport)
|
||||
(vtkBool "VTK_GROUP_ENABLE_Tk" pythonSupport)
|
||||
(lib.cmakeBool "VTK_WRAP_PYTHON" pythonSupport)
|
||||
(lib.cmakeBool "VTK_BUILD_PYI_FILES" pythonSupport)
|
||||
(lib.cmakeFeature "VTK_PYTHON_VERSION" "3")
|
||||
|
||||
# mpiSupport
|
||||
(lib.cmakeBool "VTK_USE_MPI" mpiSupport)
|
||||
(vtkBool "VTK_GROUP_ENABLE_MPI" mpiSupport)
|
||||
];
|
||||
|
||||
# byte-compile python modules since the CMake build does not do it
|
||||
postInstall = lib.optionalString pythonSupport ''
|
||||
python -m compileall -s $out $out/${python3Packages.python.sitePackages}
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "vtk" ];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
# Shared libraries don't work, because of rpath troubles with the current
|
||||
# nixpkgs cmake approach. It wants to call a binary at build time, just
|
||||
# built and requiring one of the shared objects.
|
||||
# At least, we use -fPIC for other packages to be able to use this in shared
|
||||
# objects.
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_C_FLAGS=-fPIC"
|
||||
"-DCMAKE_CXX_FLAGS=-fPIC"
|
||||
"-DVTK_MODULE_USE_EXTERNAL_vtkpng=ON"
|
||||
"-DVTK_MODULE_USE_EXTERNAL_vtktiff=1"
|
||||
"-DVTK_MODULE_ENABLE_VTK_RenderingExternal=YES"
|
||||
]
|
||||
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
"-DOPENGL_INCLUDE_DIR=${lib.getInclude libGL}/include"
|
||||
(lib.cmakeBool "VTK_OPENGL_HAS_EGL" enableEgl)
|
||||
]
|
||||
++ [
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||
"-DVTK_VERSIONED_INSTALL=OFF"
|
||||
]
|
||||
++ optionals enableQt [
|
||||
"-DVTK_GROUP_ENABLE_Qt:STRING=YES"
|
||||
]
|
||||
++ optionals enablePython [
|
||||
"-DVTK_WRAP_PYTHON:BOOL=ON"
|
||||
"-DVTK_PYTHON_VERSION:STRING=${pythonMajor}"
|
||||
];
|
||||
postFixup =
|
||||
# Remove thirdparty find module that have been provided in nixpkgs.
|
||||
''
|
||||
rm -rf $out/lib/cmake/vtk/patches
|
||||
rm $out/lib/cmake/vtk/Find{EXPAT,Freetype,utf8cpp,LibXml2,FontConfig}.cmake
|
||||
''
|
||||
# libvtkglad.so will find and load libGL.so at runtime.
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
patchelf --add-rpath ${lib.getLib libGL}/lib $out/lib/libvtkglad.so
|
||||
'';
|
||||
|
||||
env = {
|
||||
# Lots of warnings in vendored code…
|
||||
NIX_CFLAGS_COMPILE =
|
||||
if stdenv.cc.isClang then
|
||||
"-Wno-error=incompatible-function-pointer-types"
|
||||
else
|
||||
"-Wno-error=incompatible-pointer-types";
|
||||
passthru = {
|
||||
inherit
|
||||
pythonSupport
|
||||
mpiSupport
|
||||
;
|
||||
|
||||
vtkPackages = vtkPackages.overrideScope (
|
||||
final: prev: {
|
||||
vtk = finalAttrs.finalPackage;
|
||||
}
|
||||
);
|
||||
|
||||
tests = {
|
||||
cmake-config = testers.hasCmakeConfigModules {
|
||||
moduleNames = [ "VTK" ];
|
||||
|
||||
package = finalAttrs.finalPackage;
|
||||
|
||||
nativeBuildInputs = lib.optionals (!(isNull qtPackages)) [
|
||||
qtPackages.qttools
|
||||
qtPackages.wrapQtAppsHook
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
postInstall = optionalString enablePython ''
|
||||
substitute \
|
||||
${./vtk.egg-info} \
|
||||
$out/${python.sitePackages}/vtk-${version}.egg-info \
|
||||
--subst-var-by VTK_VER "${version}"
|
||||
'';
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Open source libraries for 3D computer graphics, image processing and visualization";
|
||||
homepage = "https://www.vtk.org/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [
|
||||
tfmoraes
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
badPlatforms = optionals enableEgl platforms.darwin;
|
||||
changelog = "https://docs.vtk.org/en/latest/release_details/${lib.versions.majorMinor finalAttrs.version}.html";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ qbisi ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: vtk
|
||||
Version: @VTK_VER@
|
||||
Summary: VTK is an open-source toolkit for 3D computer graphics, image processing, and visualization
|
||||
Platform: UNKNOWN
|
||||
@@ -25,6 +25,9 @@ buildPythonPackage rec {
|
||||
hash = "sha256-9N1dF/zwjzoxX4xYIr5084M9pAk3YK3T48OUnCoC0NU=";
|
||||
};
|
||||
|
||||
# remove this line once pyvista 0.46 is released
|
||||
pythonRelaxDeps = [ "vtk" ];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
@@ -43,7 +46,6 @@ buildPythonPackage rec {
|
||||
pythonImportsCheck = [ "pyvista" ];
|
||||
|
||||
meta = with lib; {
|
||||
broken = pythonAtLeast "3.13"; # segfault
|
||||
description = "Easier Pythonic interface to VTK";
|
||||
homepage = "https://pyvista.org";
|
||||
changelog = "https://github.com/pyvista/pyvista/releases/tag/${src.tag}";
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nix-eval-jobs";
|
||||
version = "2.29.0";
|
||||
version = "2.30.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nix-community";
|
||||
repo = "nix-eval-jobs";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-AJ22q6yWc1hPkqssXMxQqD6QUeJ6hbx52xWHhKsmuP0=";
|
||||
hash = "sha256-urOFgqXzs+cgd1CKFuN245vOeVx7rIldlS9Q5WcemCw=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -666,6 +666,7 @@ mapAliases {
|
||||
|
||||
### F ###
|
||||
|
||||
f3d_egl = lib.warnOnInstantiate "'f3d' now build with egl support by default, so `f3d_egl` is deprecated, consider using 'f3d' instead." f3d; # added 2025-07-18
|
||||
factor-lang-scope = throw "'factor-lang-scope' has been renamed to 'factorPackages'"; # added 2024-11-28
|
||||
fahcontrol = throw "fahcontrol has been removed because the download is no longer available"; # added 2024-09-24
|
||||
fahviewer = throw "fahviewer has been removed because the download is no longer available"; # added 2024-09-24
|
||||
@@ -2123,6 +2124,9 @@ mapAliases {
|
||||
vocal = throw "'vocal' has been archived upstream. Consider using 'gnome-podcasts' or 'kasts' instead."; # Added 2025-04-12
|
||||
void = throw "'void' has been removed due to lack of upstream maintenance"; # Added 2025-01-25
|
||||
volnoti = throw "'volnoti' has been removed due to lack of maintenance upstream."; # Added 2024-12-04
|
||||
vtk_9 = lib.warnOnInstantiate "'vtk_9' has been renamed to 'vtk_9_5'" vtk_9_5; # Added 2025-07-18
|
||||
vtk_9_egl = lib.warnOnInstantiate "'vtk_9_5' now build with egl support by default, so `vtk_9_egl` is deprecated, consider using 'vtk_9_5' instead." vtk_9_5; # Added 2025-07-18
|
||||
vtk_9_withQt5 = throw "'vtk_9_withQt5' has been removed, Consider using 'vtkWithQt5' instead." vtkWithQt5; # Added 2025-07-18
|
||||
vuze = throw "'vuze' was removed because it is unmaintained upstream and insecure (CVE-2018-13417). BiglyBT is a maintained fork."; # Added 2024-11-22
|
||||
vwm = throw "'vwm' was removed as it is broken and not maintained upstream"; # Added 2025-05-17
|
||||
inherit (libsForQt5.mauiPackages) vvave; # added 2022-05-17
|
||||
|
||||
@@ -2112,8 +2112,6 @@ with pkgs;
|
||||
waylandSupport = !stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
|
||||
f3d_egl = f3d.override { vtk_9 = vtk_9_egl; };
|
||||
|
||||
fast-cli = nodePackages.fast-cli;
|
||||
|
||||
### TOOLS/TYPESETTING/TEX
|
||||
@@ -9635,17 +9633,19 @@ with pkgs;
|
||||
wine = wineWowPackages.staging;
|
||||
};
|
||||
|
||||
vtk_9 = libsForQt5.callPackage ../development/libraries/vtk/9.x.nix {
|
||||
stdenv = if stdenv.cc.isClang then llvmPackages_17.stdenv else stdenv;
|
||||
inherit (callPackage ../development/libraries/vtk { }) vtk_9_5;
|
||||
|
||||
vtk = vtk_9_5;
|
||||
|
||||
vtk-full = vtk.override {
|
||||
qtVersion = "6";
|
||||
mpiSupport = true;
|
||||
pythonSupport = true;
|
||||
};
|
||||
|
||||
vtk_9_withQt5 = vtk_9.override { enableQt = true; };
|
||||
vtkWithQt5 = vtk.override { qtVersion = "5"; };
|
||||
|
||||
vtk = vtk_9;
|
||||
|
||||
vtk_9_egl = vtk_9.override { enableEgl = true; };
|
||||
|
||||
vtkWithQt5 = vtk_9_withQt5;
|
||||
vtkWithQt6 = vtk.override { qtVersion = "6"; };
|
||||
|
||||
vulkan-caps-viewer = libsForQt5.callPackage ../tools/graphics/vulkan-caps-viewer { };
|
||||
|
||||
@@ -16050,7 +16050,7 @@ with pkgs;
|
||||
);
|
||||
|
||||
nix-eval-jobs = callPackage ../tools/package-management/nix-eval-jobs {
|
||||
nix = nixVersions.nix_2_29;
|
||||
nix = nixVersions.nix_2_30;
|
||||
};
|
||||
|
||||
nix-delegate = haskell.lib.compose.justStaticExecutables haskellPackages.nix-delegate;
|
||||
|
||||
@@ -240,6 +240,7 @@ mapAliases ({
|
||||
ev3dev2 = python-ev3dev2; # added 2023-06-19
|
||||
evernote = throw "evernote is intended for use with Python 2.X";
|
||||
eyeD3 = eyed3; # added 2024-01-03
|
||||
f3d_egl = lib.warnOnInstantiate "'f3d' now build with egl support by default, so `f3d_egl` is deprecated, consider using 'f3d' instead." f3d; # added 2025-07-18
|
||||
Fabric = fabric; # addedd 2023-02-19
|
||||
face_recognition = face-recognition; # added 2022-10-15
|
||||
face_recognition_models = face-recognition-models; # added 2022-10-15
|
||||
|
||||
@@ -4872,13 +4872,6 @@ self: super: with self; {
|
||||
}
|
||||
);
|
||||
|
||||
f3d_egl = toPythonModule (
|
||||
pkgs.f3d_egl.override {
|
||||
withPythonBinding = true;
|
||||
python3Packages = self;
|
||||
}
|
||||
);
|
||||
|
||||
f5-icontrol-rest = callPackage ../development/python-modules/f5-icontrol-rest { };
|
||||
|
||||
f5-sdk = callPackage ../development/python-modules/f5-sdk { };
|
||||
@@ -19397,12 +19390,7 @@ self: super: with self; {
|
||||
|
||||
vtjp = callPackage ../development/python-modules/vtjp { };
|
||||
|
||||
vtk = toPythonModule (
|
||||
pkgs.vtk_9.override {
|
||||
inherit python;
|
||||
enablePython = true;
|
||||
}
|
||||
);
|
||||
vtk = toPythonModule (pkgs.vtk-full.override { python3Packages = self; });
|
||||
|
||||
vttlib = callPackage ../development/python-modules/vttlib { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user