diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-06-17 06:01:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-17 06:01:23 +0000 |
commit | a6338915503cf239715662139526f42cf4180d5c (patch) | |
tree | c3d9e4867d64f233aef2f5200831255f7263f83b | |
parent | 1a097a5260fec9afc44ff7eed79a41118378450a (diff) | |
parent | e2efed58f1ad7114822ea72045f718a89fd1d254 (diff) |
Merge master into staging-next
46 files changed, 864 insertions, 46 deletions
diff --git a/nixos/modules/services/security/oauth2-proxy.nix b/nixos/modules/services/security/oauth2-proxy.nix index 3079a1d030c52..a897f04ea6333 100644 --- a/nixos/modules/services/security/oauth2-proxy.nix +++ b/nixos/modules/services/security/oauth2-proxy.nix @@ -586,11 +586,11 @@ in wantedBy = [ "multi-user.target" ]; wants = [ "network-online.target" ] ++ lib.optionals needsKeycloak [ "keycloak.service" ]; after = [ "network-online.target" ] ++ lib.optionals needsKeycloak [ "keycloak.service" ]; - + restartTriggers = [ cfg.keyFile ]; serviceConfig = { User = "oauth2-proxy"; Restart = "always"; - ExecStart = "${cfg.package}/bin/oauth2-proxy ${configString}"; + ExecStart = "${lib.getExe cfg.package} ${configString}"; EnvironmentFile = lib.mkIf (cfg.keyFile != null) cfg.keyFile; }; }; diff --git a/nixos/tests/quickwit.nix b/nixos/tests/quickwit.nix index 145959f7d3f51..7e617c63d7973 100644 --- a/nixos/tests/quickwit.nix +++ b/nixos/tests/quickwit.nix @@ -1,5 +1,54 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: +let + # Define an example Quickwit index schema, + # and some `exampleDocs` below, to test if ingesting + # and querying works as expected. + index_yaml = '' + version: 0.7 + index_id: example_server_logs + doc_mapping: + mode: dynamic + field_mappings: + - name: datetime + type: datetime + fast: true + input_formats: + - iso8601 + output_format: iso8601 + fast_precision: seconds + fast: true + - name: git + type: text + tokenizer: raw + - name: hostname + type: text + tokenizer: raw + - name: level + type: text + tokenizer: raw + - name: message + type: text + - name: location + type: text + - name: source + type: text + timestamp_field: datetime + + search_settings: + default_search_fields: [message] + + indexing_settings: + commit_timeout_secs: 10 + ''; + + exampleDocs = '' + {"datetime":"2024-05-03T02:36:41.017674444Z","git":"e6e1f087ce12065e44ed3b87b50784e6f9bcc2f9","hostname":"machine-1","level":"Info","message":"Processing request done","location":"path/to/server.c:6442:32","source":""} + {"datetime":"2024-05-04T02:36:41.017674444Z","git":"e6e1f087ce12065e44ed3b87b50784e6f9bcc2f9","hostname":"machine-1","level":"Info","message":"Got exception processing request: HTTP 404","location":"path/to/server.c:6444:32","source":""} + {"datetime":"2024-05-05T02:36:41.017674444Z","git":"e6e1f087ce12065e44ed3b87b50784e6f9bcc2f9","hostname":"machine-1","level":"Info","message":"Got exception processing request: HTTP 404","location":"path/to/server.c:6444:32","source":""} + {"datetime":"2024-05-06T02:36:41.017674444Z","git":"e6e1f087ce12065e44ed3b87b50784e6f9bcc2f9","hostname":"machine-2","level":"Info","message":"Got exception processing request: HTTP 404","location":"path/to/server.c:6444:32","source":""} + ''; +in { name = "quickwit"; meta.maintainers = [ pkgs.lib.maintainers.happysalada ]; @@ -24,6 +73,29 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: "journalctl -o cat -u quickwit.service | grep 'transitioned to ready state'" ) + with subtest("verify UI installed"): + machine.succeed("curl -sSf http://127.0.0.1:7280/ui/") + + with subtest("injest and query data"): + import json + + # Test CLI ingestion + print(machine.succeed('${pkgs.quickwit}/bin/quickwit index create --index-config ${pkgs.writeText "index.yaml" index_yaml}')) + # Important to use `--wait`, otherwise the queries below race with index processing. + print(machine.succeed('${pkgs.quickwit}/bin/quickwit index ingest --index example_server_logs --input-path ${pkgs.writeText "exampleDocs.json" exampleDocs} --wait')) + + # Test CLI query + cli_query_output = machine.succeed('${pkgs.quickwit}/bin/quickwit index search --index example_server_logs --query "exception"') + print(cli_query_output) + + # Assert query result is as expected. + num_hits = len(json.loads(cli_query_output)["hits"]) + assert num_hits == 3, f"cli_query_output contains unexpected number of results: {num_hits}" + + # Test API query + api_query_output = machine.succeed('curl --fail http://127.0.0.1:7280/api/v1/example_server_logs/search?query=exception') + print(api_query_output) + quickwit.log(quickwit.succeed( "systemd-analyze security quickwit.service | grep -v '✓'" )) diff --git a/pkgs/applications/video/kodi/addons/raiplay/default.nix b/pkgs/applications/video/kodi/addons/raiplay/default.nix new file mode 100644 index 0000000000000..ab5bcfedccfdb --- /dev/null +++ b/pkgs/applications/video/kodi/addons/raiplay/default.nix @@ -0,0 +1,30 @@ +{ lib, rel, buildKodiAddon, fetchzip, addonUpdateScript, inputstreamhelper, plugin-cache }: + +buildKodiAddon rec { + pname = "raiplay"; + namespace = "plugin.video.raitv"; + version = "4.1.2"; + + propagatedBuildInputs = [ + plugin-cache + inputstreamhelper + ]; + + src = fetchzip { + url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip"; + sha256 = "sha256-9aR1kkl+0+nhP0bOTnaKCgSfuPvJzX5TWHU0WJZIvSM="; + }; + + passthru = { + updateScript = addonUpdateScript { + attrPath = "kodi.packages.raiplay"; + }; + }; + + meta = with lib; { + homepage = "https://github.com/maxbambi/plugin.video.raitv/"; + description = "Live radio and TV channels, latest 7 days of programming, broadcast archive, news"; + license = licenses.gpl3Only; + maintainers = teams.kodi.members; + }; +} diff --git a/pkgs/by-name/an/ananicy-cpp/package.nix b/pkgs/by-name/an/ananicy-cpp/package.nix index 36f56c6dffaf1..8d3416f69c57c 100644 --- a/pkgs/by-name/an/ananicy-cpp/package.nix +++ b/pkgs/by-name/an/ananicy-cpp/package.nix @@ -75,7 +75,7 @@ clangStdenv.mkDerivation rec { meta = { homepage = "https://gitlab.com/ananicy-cpp/ananicy-cpp"; description = "Rewrite of ananicy in c++ for lower cpu and memory usage"; - license = lib.licenses.gpl3Only; + license = lib.licenses.gpl3Plus; platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ artturin diff --git a/pkgs/by-name/le/less/package.nix b/pkgs/by-name/le/less/package.nix index 0844188ff775d..f94e4b0cad796 100644 --- a/pkgs/by-name/le/less/package.nix +++ b/pkgs/by-name/le/less/package.nix @@ -25,6 +25,12 @@ stdenv.mkDerivation (finalAttrs: { url = "https://gitlab.archlinux.org/archlinux/packaging/packages/less/-/raw/1d570db0c84fe95799f460526492e45e24c30ad0/backport-007521ac3c95bc76.patch"; hash = "sha256-BT8DLIu7oVhL5XL50uFVUp97qjklcvRHy85UQwVKAmc="; }) + (fetchpatch { + # https://github.com/gwsw/less/pull/416 + name = "freebsd.patch"; + url = "https://github.com/gwsw/less/commit/3ecff3752078fda90fd46c9f020f2a2bb548dd71.patch"; + hash = "sha256-Iv2Jm/7wwRsyLchoEvYz9VziySJ6sI4YbSgFTdQrV+I="; + }) ]; buildInputs = [ diff --git a/pkgs/by-name/py/pyprland/package.nix b/pkgs/by-name/py/pyprland/package.nix index 34718ddaddaba..9162724b7a758 100644 --- a/pkgs/by-name/py/pyprland/package.nix +++ b/pkgs/by-name/py/pyprland/package.nix @@ -7,7 +7,7 @@ python3Packages.buildPythonApplication rec { pname = "pyprland"; - version = "2.3.7"; + version = "2.3.8"; format = "pyproject"; disabled = python3Packages.pythonOlder "3.10"; @@ -16,7 +16,7 @@ python3Packages.buildPythonApplication rec { owner = "hyprland-community"; repo = "pyprland"; rev = "refs/tags/${version}"; - hash = "sha256-Mcn5d0p+vu1I9oKHUdOH/v1+wC9UTGZaejbsgurrrhg="; + hash = "sha256-0YUI2/gJmBoummiHGpq2p2sT25SwCdnsRwfGK2pcm4s="; }; nativeBuildInputs = with python3Packages; [ poetry-core ]; diff --git a/pkgs/applications/networking/Sylk/default.nix b/pkgs/by-name/sy/sylk/package.nix index a83742cf937cc..ab32ef5463ff2 100644 --- a/pkgs/applications/networking/Sylk/default.nix +++ b/pkgs/by-name/sy/sylk/package.nix @@ -1,12 +1,8 @@ { appimageTools, fetchurl, lib }: -let - pname = "Sylk"; - version = "3.0.1"; -in - appimageTools.wrapType2 rec { - inherit pname version; + pname = "sylk"; + version = "3.0.1"; src = fetchurl { url = "http://download.ag-projects.com/Sylk/Sylk-${version}-x86_64.AppImage"; @@ -17,12 +13,13 @@ appimageTools.wrapType2 rec { export LC_ALL=C.UTF-8 ''; - meta = with lib; { - description = "Sylk WebRTC client"; + meta = { + description = "Desktop client for SylkServer, a multiparty conferencing tool"; homepage = "https://sylkserver.com/"; - license = licenses.agpl3Plus; - maintainers = with maintainers; [ zimbatm ]; - platforms = [ "i386-linux" "x86_64-linux" ]; + license = lib.licenses.agpl3Plus; mainProgram = "Sylk"; + maintainers = with lib.maintainers; [ zimbatm ]; + platforms = [ "i386-linux" "x86_64-linux" ]; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; }; } diff --git a/pkgs/development/python-modules/curl-cffi/default.nix b/pkgs/development/python-modules/curl-cffi/default.nix index 76a4566cce7cb..82a521898a63d 100644 --- a/pkgs/development/python-modules/curl-cffi/default.nix +++ b/pkgs/development/python-modules/curl-cffi/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "curl-cffi"; - version = "0.7.0"; + version = "0.7.0b4"; src = fetchFromGitHub { owner = "yifeikong"; diff --git a/pkgs/development/python-modules/duckduckgo-search/default.nix b/pkgs/development/python-modules/duckduckgo-search/default.nix index c97b3fc9c551a..f39a99ed5f309 100644 --- a/pkgs/development/python-modules/duckduckgo-search/default.nix +++ b/pkgs/development/python-modules/duckduckgo-search/default.nix @@ -6,6 +6,7 @@ pythonOlder, setuptools, orjson, + pyreqwest-impersonate, curl-cffi, # Optional dependencies @@ -32,6 +33,7 @@ buildPythonPackage rec { click curl-cffi orjson + pyreqwest-impersonate ]; passthru.optional-dependencies = { diff --git a/pkgs/development/python-modules/mplhep/default.nix b/pkgs/development/python-modules/mplhep/default.nix index bda83366dd6bc..1daa1bc2170fa 100644 --- a/pkgs/development/python-modules/mplhep/default.nix +++ b/pkgs/development/python-modules/mplhep/default.nix @@ -17,12 +17,12 @@ buildPythonPackage rec { pname = "mplhep"; - version = "0.3.48"; + version = "0.3.49"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-rAIiaTTSf1xINdadjHk32KOpW4SMg8jdwFt8z1oiLis="; + hash = "sha256-Hxqk0eSEOWSpomrS/vTdJV9/1mKQ/yCJQOBpm9tAvqo="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/pyreqwest-impersonate/default.nix b/pkgs/development/python-modules/pyreqwest-impersonate/default.nix new file mode 100644 index 0000000000000..39e57b633170e --- /dev/null +++ b/pkgs/development/python-modules/pyreqwest-impersonate/default.nix @@ -0,0 +1,61 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + rustPlatform, + pytest, + runCommand, + boringssl, +}: + +let + # boring-sys expects the static libraries in build/ instead of lib/ + boringssl-wrapper = runCommand "boringssl-wrapper" { } '' + mkdir $out + cd $out + ln -s ${boringssl.out}/lib build + ln -s ${boringssl.dev}/include include + ''; +in +buildPythonPackage rec { + pname = "pyreqwest-impersonate"; + version = "0.4.7"; + pyproject = true; + + src = fetchFromGitHub { + owner = "deedy5"; + repo = "pyreqwest_impersonate"; + rev = "v${version}"; + hash = "sha256-ck5RqSUgnLAjZ+1A1wQRyRMahJRq3nzYvE+WBpu6wk0="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-eGmx4ftS1D7qb2pPZxp4XE44teXcRwKs3tcKm8otsaM="; + }; + + nativeBuildInputs = [ + rustPlatform.bindgenHook + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + ]; + + env.BORING_BSSL_PATH = boringssl-wrapper; + + optional-dependencies = { + dev = [ pytest ]; + }; + + # Test use network + doCheck = false; + + pythonImportsCheck = [ "pyreqwest_impersonate" ]; + + meta = { + description = "HTTP client that can impersonate web browsers (Chrome/Edge/OkHttp/Safari), mimicking their headers and TLS/JA3/JA4/HTTP2 fingerprints"; + homepage = "https://github.com/deedy5/pyreqwest_impersonate"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/development/tools/language-servers/neocmakelsp/default.nix b/pkgs/development/tools/language-servers/neocmakelsp/default.nix index 53e17e4da8200..6797c2d432502 100644 --- a/pkgs/development/tools/language-servers/neocmakelsp/default.nix +++ b/pkgs/development/tools/language-servers/neocmakelsp/default.nix @@ -5,16 +5,16 @@ rustPlatform.buildRustPackage rec { pname = "neocmakelsp"; - version = "0.7.3"; + version = "0.7.4"; src = fetchFromGitHub { owner = "Decodetalkers"; repo = "neocmakelsp"; rev = "v${version}"; - hash = "sha256-rMonXAggCsMWvyNmGu+crtw0a4zfhKJOR5GnIULWe1g="; + hash = "sha256-oYvjMpZcXIpOA/osVCOy2NxkFnEQePGf4le22M1bFPA="; }; - cargoHash = "sha256-09mpr7ncqK9c5AMhRSAe/K9pE3vXC3bxEXX3hIx3E7c="; + cargoHash = "sha256-kcqq4xnCxGIGCFlmm4EDc9ZfQHBi6k/xrhIyZ+eKs34="; meta = with lib; { description = "Cmake lsp based on tower-lsp and treesitter"; diff --git a/pkgs/os-specific/bsd/freebsd/patches/13.1/compat-install-dirs.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/compat-install-dirs.patch index 9bb2bea32ee98..4bc21cf8eb147 100644 --- a/pkgs/os-specific/bsd/freebsd/patches/13.1/compat-install-dirs.patch +++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/compat-install-dirs.patch @@ -2,12 +2,11 @@ diff --git a/tools/build/Makefile b/tools/build/Makefile index 948a5f9dfdb..592af84eeae 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile -@@ -327,15 +327,15 @@ host-symlinks: +@@ -327,14 +327,14 @@ host-symlinks: # and cross-tools stages. We do this here using mkdir since mtree may not exist # yet (this happens if we are crossbuilding from Linux/Mac). INSTALLDIR_LIST= \ - bin \ -- lib/casper \ - lib/geom \ - usr/include/casper \ - usr/include/private/ucl \ @@ -16,7 +15,6 @@ index 948a5f9dfdb..592af84eeae 100644 - usr/libdata/pkgconfig \ - usr/libexec + ${BINDIR} \ -+ ${LIBDIR}/casper \ + ${LIBDIR}/geom \ + ${INCLUDEDIR}/casper \ + ${INCLUDEDIR}/private/ucl \ diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/libcxxrt-headers.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/libcxxrt-headers.patch new file mode 100644 index 0000000000000..256db9e2d9cf4 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/libcxxrt-headers.patch @@ -0,0 +1,11 @@ +--- freebsd/lib/libcxxrt/Makefile 2024-05-30 14:27:42.328086005 -0700 ++++ freebsd/lib/libcxxrt/Makefile.mod 2024-05-30 14:27:48.048014581 -0700 +@@ -19,6 +19,8 @@ + SRCS+= terminate.cc + SRCS+= typeinfo.cc + ++INCS+=cxxabi.h unwind.h unwind-arm.h unwind-itanium.h ++ + WARNS?= 0 + CFLAGS+= -isystem ${SRCDIR} -nostdinc++ + CXXSTD?= c++14 diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/localedef.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/localedef.patch new file mode 100644 index 0000000000000..73a0341bd3240 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/localedef.patch @@ -0,0 +1,158 @@ +diff --git a/include/_ctype.h b/include/_ctype.h +index 91e6b1d14f6b..a6896b598da3 100644 +--- a/include/_ctype.h ++++ b/include/_ctype.h +@@ -44,7 +44,7 @@ + #define __CTYPE_H_ + + #include <sys/cdefs.h> +-#include <sys/_types.h> ++#include <sys/types.h> + + #define _CTYPE_A 0x00000100L /* Alpha */ + #define _CTYPE_C 0x00000200L /* Control */ +diff --git a/lib/libc/locale/collate.h b/lib/libc/locale/collate.h +index 2d3723b49f5b..6bbff732b9d7 100644 +--- a/lib/libc/locale/collate.h ++++ b/lib/libc/locale/collate.h +@@ -36,6 +36,7 @@ + #ifndef _COLLATE_H_ + #define _COLLATE_H_ + ++#include <stdint.h> + #include <sys/cdefs.h> + #include <sys/types.h> + #include <limits.h> +diff --git a/usr.bin/localedef/charmap.c b/usr.bin/localedef/charmap.c +index 44b7e3292eae..79c30b7cf372 100644 +--- a/usr.bin/localedef/charmap.c ++++ b/usr.bin/localedef/charmap.c +@@ -31,6 +31,7 @@ + /* + * CHARMAP file handling for localedef. + */ ++#include <stdint.h> + #include <sys/cdefs.h> + #include <sys/types.h> + #include <sys/tree.h> +diff --git a/usr.bin/localedef/collate.c b/usr.bin/localedef/collate.c +index 2a080773a95e..3f0030c638f5 100644 +--- a/usr.bin/localedef/collate.c ++++ b/usr.bin/localedef/collate.c +@@ -31,6 +31,7 @@ + /* + * LC_COLLATE database generation routines for localedef. + */ ++#include <stdint.h> + #include <sys/cdefs.h> + #include <sys/types.h> + #include <sys/tree.h> +diff --git a/usr.bin/localedef/ctype.c b/usr.bin/localedef/ctype.c +index ab7b76e57b2d..846c6d6480a8 100644 +--- a/usr.bin/localedef/ctype.c ++++ b/usr.bin/localedef/ctype.c +@@ -32,6 +32,7 @@ + /* + * LC_CTYPE database generation routines for localedef. + */ ++#include <stdint.h> + #include <sys/cdefs.h> + #include <sys/tree.h> + +diff --git a/usr.bin/localedef/localedef.c b/usr.bin/localedef/localedef.c +index 5ff146d6f655..ed69aa1f0c0e 100644 +--- a/usr.bin/localedef/localedef.c ++++ b/usr.bin/localedef/localedef.c +@@ -32,7 +32,7 @@ + * POSIX localedef. + */ + #include <sys/cdefs.h> +-#include <sys/endian.h> ++#include <endian.h> + #include <sys/stat.h> + #include <sys/types.h> + +diff --git a/usr.bin/localedef/messages.c b/usr.bin/localedef/messages.c +index 6b8eb9d684dd..0155821d0e56 100644 +--- a/usr.bin/localedef/messages.c ++++ b/usr.bin/localedef/messages.c +@@ -31,6 +31,7 @@ + /* + * LC_MESSAGES database generation routines for localedef. + */ ++#include <stdint.h> + #include <sys/cdefs.h> + #include <stdio.h> + #include <stdlib.h> +diff --git a/usr.bin/localedef/monetary.c b/usr.bin/localedef/monetary.c +index 7a77ac7e256c..7636c4deca1f 100644 +--- a/usr.bin/localedef/monetary.c ++++ b/usr.bin/localedef/monetary.c +@@ -31,6 +31,7 @@ + /* + * LC_MONETARY database generation routines for localedef. + */ ++#include <stdint.h> + #include <sys/cdefs.h> + #include <stdio.h> + #include <stdlib.h> +diff --git a/usr.bin/localedef/numeric.c b/usr.bin/localedef/numeric.c +index 5533b7c10e1a..9c47494f815c 100644 +--- a/usr.bin/localedef/numeric.c ++++ b/usr.bin/localedef/numeric.c +@@ -31,6 +31,7 @@ + /* + * LC_NUMERIC database generation routines for localedef. + */ ++#include <stdint.h> + #include <sys/cdefs.h> + #include <stdio.h> + #include <stdlib.h> +diff --git a/usr.bin/localedef/parser.y b/usr.bin/localedef/parser.y +index 23b3b54f8a6e..e01330f0152d 100644 +--- a/usr.bin/localedef/parser.y ++++ b/usr.bin/localedef/parser.y +@@ -33,6 +33,7 @@ + * POSIX localedef grammar. + */ + ++#include <stdint.h> + #include <wchar.h> + #include <stdio.h> + #include <limits.h> +diff --git a/usr.bin/localedef/scanner.c b/usr.bin/localedef/scanner.c +index c6d45a993f28..b17670ef4b4a 100644 +--- a/usr.bin/localedef/scanner.c ++++ b/usr.bin/localedef/scanner.c +@@ -32,6 +32,7 @@ + * This file contains the "scanner", which tokenizes the input files + * for localedef for processing by the higher level grammar processor. + */ ++#include <stdint.h> + #include <sys/cdefs.h> + #include <stdio.h> + #include <stdlib.h> +diff --git a/usr.bin/localedef/time.c b/usr.bin/localedef/time.c +index 7a56e244c921..0e409a742d0a 100644 +--- a/usr.bin/localedef/time.c ++++ b/usr.bin/localedef/time.c +@@ -31,6 +31,7 @@ + /* + * LC_TIME database generation routines for localedef. + */ ++#include <stdint.h> + #include <sys/cdefs.h> + #include <stdio.h> + #include <stdlib.h> +diff --git a/usr.bin/localedef/wide.c b/usr.bin/localedef/wide.c +index 062e120e6912..a199cddb198d 100644 +--- a/usr.bin/localedef/wide.c ++++ b/usr.bin/localedef/wide.c +@@ -34,6 +34,7 @@ + * to the wide character forms used internally by libc. Unfortunately, + * this approach means that we need a method for each and every encoding. + */ ++#include <stdint.h> + #include <sys/cdefs.h> + #include <ctype.h> + #include <stdlib.h> diff --git a/pkgs/os-specific/bsd/freebsd/patches/14.0/tinfo-host-cc.patch b/pkgs/os-specific/bsd/freebsd/patches/14.0/tinfo-host-cc.patch new file mode 100644 index 0000000000000..6446322a8a0a3 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/patches/14.0/tinfo-host-cc.patch @@ -0,0 +1,15 @@ +--- a/lib/ncurses/tinfo/Makefile 2023-12-26 23:02:07.827892619 -0800 ++++ b/lib/ncurses/tinfo/Makefile 2023-12-26 23:01:24.175546100 -0800 +@@ -282,10 +282,10 @@ + build-tools: make_hash make_keys + + make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} +- ${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c ++ ${CC_HOST:N${CCACHE_BIN}} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c + + make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} +- ${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} -DMAIN_PROGRAM \ ++ ${CC_HOST:N${CCACHE_BIN}} -o $@ ${CFLAGS} -DMAIN_PROGRAM \ + ${NCURSES_DIR}/ncurses/tinfo/make_hash.c + .endif + .if ${MK_DIRDEPS_BUILD} == "yes" && ${MACHINE} != "host" diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/bin.nix b/pkgs/os-specific/bsd/freebsd/pkgs/bin.nix new file mode 100644 index 0000000000000..2b2738ec5794a --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/bin.nix @@ -0,0 +1,92 @@ +{ + mkDerivation, + pkgsBuildBuild, + libjail, + libmd, + libnetbsd, + libcapsicum, + libcasper, + libelf, + libxo, + libncurses-tinfo, + libedit, + lib, + stdenv, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + tsort, + lorder, + mandoc, + groff, + byacc, + gencat, +}: +mkDerivation { + pname = "bins"; + path = "bin"; + extraPaths = [ + "sys/conf" + "sys/sys/param.h" + "contrib/sendmail" + "contrib/tcsh" + "usr.bin/printf" + "lib/libsm" + ]; + buildInputs = [ + libjail + libmd + libnetbsd + libcapsicum + libcasper + libelf + libxo + libncurses-tinfo + libedit + ]; + nativeBuildInputs = [ + bsdSetupHook + freebsdSetupHook + makeMinimal + install + tsort + lorder + mandoc + groff + + byacc + gencat + ]; + + MK_TESTS = "no"; + + postPatch = '' + sed -E -i -e '/#define\tBSD.*/d' $BSDSRCDIR/sys/sys/param.h + sed -E -i -e '/^SYMLINKS.*/d' $BSDSRCDIR/bin/*/Makefile + sed -E -i -e 's/mktemp -t ka/mktemp -t kaXXXXXX/' $BSDSRCDIR/bin/sh/mkbuiltins $BSDSRCDIR/bin/sh/mktokens + ''; + + preBuild = '' + export NIX_CFLAGS_COMPILE="-I$BSDSRCDIR/sys $NIX_CFLAGS_COMPILE" + + make -C $BSDSRCDIR/lib/libsm $makeFlags + + make -C $BSDSRCDIR/bin/sh $makeFlags "CC=${pkgsBuildBuild.stdenv.cc}/bin/cc" CFLAGS="-D__unused= -D__printf0like\(a,b\)= -D__dead2=" ${ + lib.optionalString (!stdenv.buildPlatform.isFreeBSD) "MK_PIE=no " + }mkbuiltins mksyntax mktokens mknodes + make -C $BSDSRCDIR/bin/csh $makeFlags "CC=${pkgsBuildBuild.stdenv.cc}/bin/cc" CFLAGS="-D__unused= -D__printf0like\(a,b\)= -D__dead2= -I$BSDSRCDIR/contrib/tcsh -I." ${ + lib.optionalString (!stdenv.buildPlatform.isFreeBSD) "MK_PIE=no " + }gethost + ''; + + preInstall = '' + makeFlags="$makeFlags ROOTDIR=$out/root" + ''; + + outputs = [ + "out" + "man" + "debug" + ]; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/boot-install.nix b/pkgs/os-specific/bsd/freebsd/pkgs/boot-install.nix index 966489d9aef36..79dab282e3f3f 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/boot-install.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/boot-install.nix @@ -1,10 +1,23 @@ { buildPackages, freebsd-lib }: -# Wrap NetBSD's install +# Wrap GNU coreutils' install +# The -l flag causes a symlink instead of a copy to be installed, so +# it is safe to discard during bootstrap since coreutils does not support it. + buildPackages.writeShellScriptBin "boot-install" ( freebsd-lib.install-wrapper + '' + fixed_args=() + while [[ ''${#args[0]} > 0 ]]; do + case "''${args[0]}" in + -l) + args=("''${args[@]:2}") + continue + esac + fixed_args+=("''${args[0]}") + args=("''${args[@]:1}") + done - ${buildPackages.netbsd.install}/bin/xinstall "''${args[@]}" + ${buildPackages.coreutils}/bin/install "''${fixed_args[@]}" '' ) diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/cp.nix b/pkgs/os-specific/bsd/freebsd/pkgs/cp.nix new file mode 100644 index 0000000000000..3ebfd91a4e153 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/cp.nix @@ -0,0 +1,10 @@ +{ mkDerivation }: +mkDerivation { + path = "bin/cp"; + + extraPaths = [ "sys" ]; + + postPatch = '' + substituteInPlace $BSDSRCDIR/bin/cp/Makefile --replace 'tests' "" + ''; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/csu.nix b/pkgs/os-specific/bsd/freebsd/pkgs/csu.nix index 0f74d78b1d13d..020a08c1d01ef 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/csu.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/csu.nix @@ -12,7 +12,7 @@ }: mkDerivation { - isStatic = true; + noLibc = true; path = "lib/csu"; extraPaths = [ "lib/Makefile.inc" diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/filterSource.nix b/pkgs/os-specific/bsd/freebsd/pkgs/filterSource.nix index dc215c18aecb7..09674056d9cd8 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/filterSource.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/filterSource.nix @@ -18,6 +18,17 @@ let lib.concatMapStringsSep "\n" (path: "/${path}") sortedPaths ); in -runCommand "${pname}-filtered-src" { nativeBuildInputs = [ pkgsBuildBuild.rsync ]; } '' - rsync -a -r --files-from=${filterText} ${source}/ $out -'' +runCommand "${pname}-filtered-src" + { + nativeBuildInputs = [ + (pkgsBuildBuild.rsync.override { + enableZstd = false; + enableXXHash = false; + enableOpenSSL = false; + enableLZ4 = false; + }) + ]; + } + '' + rsync -a -r --files-from=${filterText} ${source}/ $out + '' diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/iconv.nix b/pkgs/os-specific/bsd/freebsd/pkgs/iconv.nix new file mode 100644 index 0000000000000..9c1ba1835c145 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/iconv.nix @@ -0,0 +1,12 @@ +{ + mkDerivation, + libcapsicum, + libcasper, +}: +mkDerivation { + path = "usr.bin/iconv"; + buildInputs = [ + libcapsicum + libcasper + ]; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix index 70734226a54f5..a7ceb0cdf384f 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix @@ -7,7 +7,7 @@ }: mkDerivation { - isStatic = true; + noLibc = true; path = "include"; extraPaths = [ diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/ldd.nix b/pkgs/os-specific/bsd/freebsd/pkgs/ldd.nix new file mode 100644 index 0000000000000..406e37402b2bb --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/ldd.nix @@ -0,0 +1,21 @@ +{ + lib, + stdenv, + mkDerivation, + libelf, +}: +mkDerivation { + path = "usr.bin/ldd"; + extraPaths = [ + "libexec/rtld-elf" + "contrib/elftoolchain/libelf" + ]; + + buildInputs = [ libelf ]; + + env = { + NIX_CFLAGS_COMPILE = "-D_RTLD_PATH=${lib.getLib stdenv.cc.libc}/libexec/ld-elf.so.1"; + }; + + meta.platforms = lib.platforms.freebsd; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix index 8f2cc976463e4..a991e69265823 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix @@ -21,7 +21,7 @@ }: mkDerivation { - isStatic = true; + noLibc = true; pname = "libc"; path = "lib/libc"; extraPaths = diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libcapsicum.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libcapsicum.nix new file mode 100644 index 0000000000000..3cb1560df77aa --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libcapsicum.nix @@ -0,0 +1 @@ +{ mkDerivation }: mkDerivation { path = "lib/libcapsicum"; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libcasper.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libcasper.nix new file mode 100644 index 0000000000000..df27f72bc8cb0 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libcasper.nix @@ -0,0 +1,26 @@ +{ + lib, + stdenv, + mkDerivation, + libnv, +}: +mkDerivation { + path = "lib/libcasper/libcasper"; + extraPaths = [ + "lib/Makefile.inc" + "lib/libcasper" + ]; + buildInputs = [ libnv ]; + + MK_TESTS = "no"; + + makeFlags = [ + "STRIP=-s" # flag to install, not command + "CFLAGS=-DWITH_CASPER" + ] ++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "MK_WERROR=no"; + + postInstall = '' + make -C $BSDSRCDIR/lib/libcasper/services $makeFlags CFLAGS="-DWITH_CASPER -I$out/include" + make -C $BSDSRCDIR/lib/libcasper/services $makeFlags install + ''; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libcxxrt.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libcxxrt.nix index 0640d2292d491..fd5591c0ffb8a 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/libcxxrt.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libcxxrt.nix @@ -1,4 +1,4 @@ -{ mkDerivation, ... }: +{ mkDerivation }: # this package is quite different from stock libcxxrt. # as of FreeBSD 14.0, it is vendored from APPROXIMATELY libcxxrt # 5d8a15823a103bbc27f1bfdcf2b5aa008fab57dd, though the vendoring mechanism is @@ -8,4 +8,11 @@ mkDerivation { pname = "libcxxrt"; path = "lib/libcxxrt"; extraPaths = [ "contrib/libcxxrt" ]; + outputs = [ + "out" + "dev" + "debug" + ]; + noLibcxx = true; + libName = "cxxrt"; } diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libdl.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libdl.nix new file mode 100644 index 0000000000000..2b77a0f716624 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libdl.nix @@ -0,0 +1,9 @@ +{ mkDerivation, ... }: +mkDerivation { + path = "lib/libdl"; + extraPaths = [ + "lib/libc" + "libexec/rtld-elf" + ]; + buildInputs = [ ]; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libedit.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libedit.nix new file mode 100644 index 0000000000000..50b1c9f58333f --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libedit.nix @@ -0,0 +1,7 @@ +{ mkDerivation, libncurses-tinfo }: +mkDerivation { + path = "lib/libedit"; + extraPaths = [ "contrib/libedit" ]; + buildInputs = [ libncurses-tinfo ]; + MK_TESTS = "no"; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libelf.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libelf.nix new file mode 100644 index 0000000000000..a116aff81f397 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libelf.nix @@ -0,0 +1,29 @@ +{ + mkDerivation, + lib, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + m4, +}: +mkDerivation { + path = "lib/libelf"; + extraPaths = [ + "lib/libc" + "contrib/elftoolchain" + "sys/sys/elf32.h" + "sys/sys/elf64.h" + "sys/sys/elf_common.h" + ]; + buildInputs = [ ]; + nativeBuildInputs = [ + bsdSetupHook + freebsdSetupHook + makeMinimal + install + m4 + ]; + + meta.platforms = lib.platforms.freebsd; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libjail.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libjail.nix new file mode 100644 index 0000000000000..9150be559c650 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libjail.nix @@ -0,0 +1,5 @@ +{ mkDerivation }: +mkDerivation { + path = "lib/libjail"; + MK_TESTS = "no"; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libncurses-tinfo.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libncurses-tinfo.nix new file mode 100644 index 0000000000000..f86f78dbc2914 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libncurses-tinfo.nix @@ -0,0 +1,15 @@ +{ mkDerivation, pkgsBuildBuild }: +mkDerivation { + path = "lib/ncurses/tinfo"; + extraPaths = [ + "lib/ncurses" + "contrib/ncurses" + "lib/Makefile.inc" + ]; + CC_HOST = "${pkgsBuildBuild.stdenv.cc}/bin/cc"; + MK_TESTS = "no"; + preBuild = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -D_VA_LIST -D_VA_LIST_DECLARED -Dva_list=__builtin_va_list -D_SIZE_T -D_WCHAR_T" + make $makeFlags "CFLAGS=-D_VA_LIST -D_VA_LIST_DECLARED -Dva_list=__builtin_va_list -I$BSDSRCDIR/contrib/ncurses/ncurses -I$BSDSRCDIR/contrib/ncurses/include -I." ncurses_dll.h make_hash make_keys + ''; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libncurses.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libncurses.nix new file mode 100644 index 0000000000000..2dd1ee2fe57de --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libncurses.nix @@ -0,0 +1,25 @@ +{ + lib, + versionData, + mkDerivation, + libncurses-tinfo, + ... +}: +mkDerivation { + path = "lib/ncurses/ncurses"; + extraPaths = [ + "lib/ncurses" + "contrib/ncurses" + "lib/Makefile.inc" + ]; + MK_TESTS = "no"; + preBuild = lib.optionalString (versionData.major == 14) '' + make -C ../tinfo $makeFlags curses.h ncurses_dll.h ncurses_def.h + ''; + buildInputs = lib.optionals (versionData.major == 14) [ libncurses-tinfo ]; + + # some packages depend on libncursesw.so.8 + postInstall = '' + ln -s $out/lib/libncursesw.so.9 $out/lib/libncursesw.so.8 + ''; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libxo.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libxo.nix new file mode 100644 index 0000000000000..a4882ea1970c3 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libxo.nix @@ -0,0 +1,6 @@ +{ mkDerivation }: +mkDerivation { + path = "lib/libxo"; + extraPaths = [ "contrib/libxo" ]; + MK_TESTS = "no"; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/locale.nix b/pkgs/os-specific/bsd/freebsd/pkgs/locale.nix new file mode 100644 index 0000000000000..b661a7cee853f --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/locale.nix @@ -0,0 +1,7 @@ +{ mkDerivation, libsbuf }: +mkDerivation { + path = "usr.bin/locale"; + buildInputs = [ libsbuf ]; + extraPaths = [ "lib/libc/locale" ]; + MK_TESTS = "no"; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/localedef.nix b/pkgs/os-specific/bsd/freebsd/pkgs/localedef.nix new file mode 100644 index 0000000000000..2e4902860c8d9 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/localedef.nix @@ -0,0 +1,39 @@ +{ + mkDerivation, + lib, + stdenv, + compat, + bsdSetupHook, + byacc, + freebsdSetupHook, + makeMinimal, + install, +}: +mkDerivation ( + { + path = "usr.bin/localedef"; + + extraPaths = [ + "lib/libc/locale" + "lib/libc/stdtime" + ] ++ lib.optionals (!stdenv.hostPlatform.isFreeBSD) [ "." ]; + + nativeBuildInputs = [ + bsdSetupHook + byacc + freebsdSetupHook + makeMinimal + install + ]; + + buildInputs = [ ]; + + preBuild = lib.optionalString (!stdenv.hostPlatform.isFreeBSD) '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${compat}/include -D__unused= -D__pure= -Wno-strict-aliasing" + export NIX_LDFLAGS="$NIX_LDFLAGS -L${compat}/lib" + ''; + + MK_TESTS = "no"; + } + // lib.optionalAttrs (!stdenv.hostPlatform.isFreeBSD) { BOOTSTRAPPING = 1; } +) diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/locales.nix b/pkgs/os-specific/bsd/freebsd/pkgs/locales.nix new file mode 100644 index 0000000000000..d8d3de93d5ec7 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/locales.nix @@ -0,0 +1,51 @@ +{ + mkDerivation, + lib, + symlinkJoin, + bsdSetupHook, + freebsdSetupHook, + makeMinimal, + install, + tsort, + lorder, + mandoc, + groff, + localedef, + allLocales ? true, + locales ? [ "en_US.UTF-8" ], +}: +let + build = + name: needsLocaledef: + mkDerivation { + path = "share/${name}"; + + extraPaths = lib.optional needsLocaledef "tools/tools/locale/etc/final-maps"; + nativeBuildInputs = [ + bsdSetupHook + freebsdSetupHook + makeMinimal + install + tsort + lorder + mandoc + groff + ] ++ lib.optional needsLocaledef localedef; + }; + directories = { + colldef = true; + colldef_unicode = true; + ctypedef = true; + monetdef = false; + monetdef_unicode = false; + msgdef = false; + msgdef_unicode = false; + numericdef = false; + numericdef_unicode = false; + timedef = false; + }; +in +symlinkJoin { + name = "freebsd-locales"; + paths = lib.mapAttrsToList build directories; +} diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix b/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix index be195b3bc6fa5..12f2c9407e3c2 100644 --- a/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix +++ b/pkgs/os-specific/bsd/freebsd/pkgs/mkDerivation.nix @@ -2,6 +2,9 @@ lib, stdenv, stdenvNoCC, + stdenvNoLibs, + overrideCC, + buildPackages, versionData, writeText, patches, @@ -21,7 +24,15 @@ lib.makeOverridable ( attrs: let - stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv; + stdenv' = + if attrs.noCC or false then + stdenvNoCC + else if attrs.noLibc or false then + stdenvNoLibs + else if attrs.noLibcxx or false then + overrideCC stdenv buildPackages.llvmPackages.clangNoLibcxx + else + stdenv; in stdenv'.mkDerivation ( rec { @@ -128,15 +139,17 @@ lib.makeOverridable ( splitPatch = patchFile: let + allLines' = lib.strings.splitString "\n" (builtins.readFile patchFile); + allLines = builtins.filter ( + line: !((lib.strings.hasPrefix "diff --git" line) || (lib.strings.hasPrefix "index " line)) + ) allLines'; foldFunc = a: b: - if (lib.strings.hasPrefix "--- " b) then + if ((lib.strings.hasPrefix "--- " b) || (lib.strings.hasPrefix "diff --git " b)) then (a ++ [ [ b ] ]) else ((lib.lists.init a) ++ (lib.lists.singleton ((lib.lists.last a) ++ [ b ]))); - partitionedPatches' = lib.lists.foldl foldFunc [ [ ] ] ( - lib.strings.splitString "\n" (builtins.readFile patchFile) - ); + partitionedPatches' = lib.lists.foldl foldFunc [ [ ] ] allLines; partitionedPatches = if (builtins.length partitionedPatches' > 1) then (lib.lists.drop 1 partitionedPatches') diff --git a/pkgs/servers/search/quickwit/default.nix b/pkgs/servers/search/quickwit/default.nix index 095bfc679aa47..e99289b089545 100644 --- a/pkgs/servers/search/quickwit/default.nix +++ b/pkgs/servers/search/quickwit/default.nix @@ -7,14 +7,20 @@ , protobuf , rust-jemalloc-sys , Security +, nodejs +, yarn +, fetchYarnDeps +, fixup-yarn-lock }: let pname = "quickwit"; version = "0.8.1"; -in -rustPlatform.buildRustPackage rec { - inherit pname version; + + yarnOfflineCache = fetchYarnDeps { + yarnLock = "${src}/quickwit/quickwit-ui/yarn.lock"; + hash = "sha256-HppK9ycUxCOIagvzCmE+VfcmfMQfPIC8WeWM6WbA6fQ="; + }; src = fetchFromGitHub { owner = "quickwit-oss"; @@ -23,6 +29,41 @@ rustPlatform.buildRustPackage rec { hash = "sha256-B5U9nzXh6kj3/UnQzM3//h4hn9ippWHbeDMcMTP9XfM="; }; + quickwit-ui = stdenv.mkDerivation { + name = "quickwit-ui"; + src = "${src}/quickwit/quickwit-ui"; + + nativeBuildInputs = [ + nodejs + yarn + fixup-yarn-lock + ]; + + configurePhase = '' + export HOME=$(mktemp -d) + ''; + + buildPhase = '' + yarn config --offline set yarn-offline-mirror ${yarnOfflineCache} + fixup-yarn-lock yarn.lock + + yarn install --offline \ + --frozen-lockfile --no-progress \ + --ignore-engines --ignore-scripts + patchShebangs . + + yarn build + ''; + + installPhase = '' + mkdir $out + mv build/* $out + ''; + }; +in +rustPlatform.buildRustPackage rec { + inherit pname version src; + postPatch = '' substituteInPlace ./quickwit-ingest/build.rs \ --replace-fail '.with_protos' '.with_includes(&["."]).with_protos' @@ -34,6 +75,11 @@ rustPlatform.buildRustPackage rec { sourceRoot = "${src.name}/quickwit"; + preBuild = '' + mkdir -p quickwit-ui/build + cp -r ${quickwit-ui}/* quickwit-ui/build + ''; + buildInputs = [ rust-jemalloc-sys ] ++ lib.optionals stdenv.isDarwin [ Security ]; @@ -50,6 +96,9 @@ rustPlatform.buildRustPackage rec { }; }; + CARGO_PROFILE_RELEASE_LTO = "fat"; + CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1"; + # needed for internal protobuf c wrapper library PROTOC = "${protobuf}/bin/protoc"; PROTOC_INCLUDE = "${protobuf}/include"; diff --git a/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch b/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch index 578bd325d56bd..a53b7f1f52f49 100644 --- a/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch +++ b/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch @@ -11,14 +11,23 @@ index 2b45489..0e6d8ef 100644 GC_bool found_me = FALSE; size_t nthreads = 0; int i; -@@ -868,6 +870,31 @@ GC_INNER void GC_push_all_stacks(void) +@@ -868,6 +870,40 @@ GC_INNER void GC_push_all_stacks(void) hi = p->altstack + p->altstack_size; # endif /* FIXME: Need to scan the normal stack too, but how ? */ + } else { ++ #ifdef HAVE_PTHREAD_ATTR_GET_NP ++ if (pthread_attr_init(&pattr) != 0) { ++ ABORT("GC_push_all_stacks: pthread_attr_init failed!"); ++ } ++ if (pthread_attr_get_np(p->id, &pattr) != 0) { ++ ABORT("GC_push_all_stacks: pthread_attr_get_np failed!"); ++ } ++ #else + if (pthread_getattr_np(p->id, &pattr)) { + ABORT("GC_push_all_stacks: pthread_getattr_np failed!"); + } ++ #endif + if (pthread_attr_getstacksize(&pattr, &stack_limit)) { + ABORT("GC_push_all_stacks: pthread_attr_getstacksize failed!"); + } diff --git a/pkgs/tools/wayland/cliphist/default.nix b/pkgs/tools/wayland/cliphist/default.nix index 7485d79bf7bc4..0cbb856162b2a 100644 --- a/pkgs/tools/wayland/cliphist/default.nix +++ b/pkgs/tools/wayland/cliphist/default.nix @@ -1,4 +1,8 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ + lib, + buildGoModule, + fetchFromGitHub, +}: buildGoModule rec { pname = "cliphist"; @@ -13,6 +17,10 @@ buildGoModule rec { vendorHash = "sha256-O4jOFWygmFxm8ydOq1xtB1DESyWpFGXeSp8a6tT+too="; + postInstall = '' + cp ${src}/contrib/* $out/bin/ + ''; + meta = with lib; { description = "Wayland clipboard manager"; homepage = "https://github.com/sentriz/cliphist"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 213afdf99d9a1..49918da44dbae 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1277,6 +1277,7 @@ mapAliases ({ supertux-editor = throw "'supertux-editor' has been removed, as it was broken and unmaintained"; # Added 2023-12-22 swift-im = throw "swift-im has been removed as it is unmaintained and depends on deprecated Python 2 / Qt WebKit"; # Added 2023-01-06 swtpm-tpm2 = swtpm; # Added 2021-02-26 + Sylk = sylk; # Added 2024-06-12 syncthing-cli = syncthing; # Added 2021-04-06 syncthingtray-qt6 = syncthingtray; # Added 2024-03-06 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4a867078fdbf9..c8420c32a01e0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13325,8 +13325,6 @@ with pkgs; systrayhelper = callPackage ../tools/misc/systrayhelper { }; - Sylk = callPackage ../applications/networking/Sylk { }; - privoxy = callPackage ../tools/networking/privoxy { w3m = w3m-batch; }; diff --git a/pkgs/top-level/kodi-packages.nix b/pkgs/top-level/kodi-packages.nix index abc6c234e56bd..a294fa2e0d301 100644 --- a/pkgs/top-level/kodi-packages.nix +++ b/pkgs/top-level/kodi-packages.nix @@ -99,6 +99,8 @@ let radioparadise = callPackage ../applications/video/kodi/addons/radioparadise { }; + raiplay = callPackage ../applications/video/kodi/addons/raiplay { }; + svtplay = callPackage ../applications/video/kodi/addons/svtplay { }; steam-controller = callPackage ../applications/video/kodi/addons/steam-controller { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 483cb05e69962..001e1d52423d0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10087,6 +10087,8 @@ self: super: with self; { pyrender = callPackage ../development/python-modules/pyrender { }; + pyreqwest-impersonate = callPackage ../development/python-modules/pyreqwest-impersonate { }; + pyrevolve = callPackage ../development/python-modules/pyrevolve { }; pyrfxtrx = callPackage ../development/python-modules/pyrfxtrx { }; |