Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-03-20 18:01:16 +00:00 committed by GitHub
commit 75c28ec351
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 575 additions and 59 deletions

View file

@ -53,6 +53,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- [goeland](https://github.com/slurdge/goeland), an alternative to rss2email written in golang with many filters. Available as [services.goeland](#opt-services.goeland.enable).
- [alertmanager-irc-relay](https://github.com/google/alertmanager-irc-relay), a Prometheus Alertmanager IRC Relay. Available as [services.prometheus.alertmanagerIrcRelay](options.html#opt-services.prometheus.alertmanagerIrcRelay.enable).
- [tts](https://github.com/coqui-ai/TTS), a battle-tested deep learning toolkit for Text-to-Speech. Mutiple servers may be configured below [services.tts.servers](#opt-services.tts.servers).
- [atuin](https://github.com/ellie/atuin), a sync server for shell history. Available as [services.atuin](#opt-services.atuin.enable).

View file

@ -734,6 +734,7 @@
./services/monitoring/nagios.nix
./services/monitoring/netdata.nix
./services/monitoring/parsedmarc.nix
./services/monitoring/prometheus/alertmanager-irc-relay.nix
./services/monitoring/prometheus/alertmanager.nix
./services/monitoring/prometheus/default.nix
./services/monitoring/prometheus/exporters.nix

View file

@ -0,0 +1,107 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.prometheus.alertmanagerIrcRelay;
configFormat = pkgs.formats.yaml { };
configFile = configFormat.generate "alertmanager-irc-relay.yml" cfg.settings;
in
{
options.services.prometheus.alertmanagerIrcRelay = {
enable = mkEnableOption (mdDoc "Alertmanager IRC Relay");
package = mkOption {
type = types.package;
default = pkgs.alertmanager-irc-relay;
defaultText = literalExpression "pkgs.alertmanager-irc-relay";
description = mdDoc "Alertmanager IRC Relay package to use.";
};
extraFlags = mkOption {
type = types.listOf types.str;
default = [];
description = mdDoc "Extra command line options to pass to alertmanager-irc-relay.";
};
settings = mkOption {
type = configFormat.type;
example = literalExpression ''
{
http_host = "localhost";
http_port = 8000;
irc_host = "irc.example.com";
irc_port = 7000;
irc_nickname = "myalertbot";
irc_channels = [
{ name = "#mychannel"; }
];
}
'';
description = mdDoc ''
Configuration for Alertmanager IRC Relay as a Nix attribute set.
For a reference, check out the
[example configuration](https://github.com/google/alertmanager-irc-relay#configuring-and-running-the-bot)
and the
[source code](https://github.com/google/alertmanager-irc-relay/blob/master/config.go).
Note: The webhook's URL MUST point to the IRC channel where the message
should be posted. For `#mychannel` from the example, this would be
`http://localhost:8080/mychannel`.
'';
};
};
config = mkIf cfg.enable {
systemd.services.alertmanager-irc-relay = {
description = "Alertmanager IRC Relay";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
serviceConfig = {
ExecStart = ''
${cfg.package}/bin/alertmanager-irc-relay \
-config ${configFile} \
${escapeShellArgs cfg.extraFlags}
'';
DynamicUser = true;
NoNewPrivileges = true;
ProtectProc = "invisible";
ProtectSystem = "strict";
ProtectHome = "tmpfs";
PrivateTmp = true;
PrivateDevices = true;
PrivateIPC = true;
ProtectHostname = true;
ProtectClock = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectKernelLogs = true;
ProtectControlGroups = true;
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallFilter = [
"@system-service"
"~@cpu-emulation"
"~@privileged"
"~@reboot"
"~@setuid"
"~@swap"
];
};
};
};
meta.maintainers = [ maintainers.oxzi ];
}

View file

@ -93,7 +93,7 @@ let
api_token = server.succeed(
"curl --fail -X POST http://test:totallysafe@localhost:3000/api/v1/users/test/tokens "
+ "-H 'Accept: application/json' -H 'Content-Type: application/json' -d "
+ "'{\"name\":\"token\"}' | jq '.sha1' | xargs echo -n"
+ "'{\"name\":\"token\",\"scopes\":[\"all\"]}' | jq '.sha1' | xargs echo -n"
)
server.succeed(

View file

@ -8,7 +8,7 @@ buildNpmPackage rec {
owner = "jean-emmanuel";
repo = "open-stage-control";
rev = "v${version}";
hash = "sha256-P3aTGt/T59JE2oy8uRhD8h2NXX/ZXno6qY0frpcir7A=";
hash = "sha256-5QMBJw6H9TmyoSMkG5rniq1BdVYuEtQsQF1GGBkxqMI=";
};
# Remove some Electron stuff from package.json

View file

@ -189,8 +189,8 @@ final: prev:
src = fetchFromGitHub {
owner = "Yggdroot";
repo = "LeaderF";
rev = "1319824e2cbbb8471f7da56a8d787a664bb8faae";
sha256 = "01wpbwpramrfiwj0s5xv21ynjjy3wqllx3vbnpj94vcfk18qmx9m";
rev = "4b8f537dadf5f9abbdd1554584bec9c04843909c";
sha256 = "0sb94hi4qph8wg9agkg5kvqzfjnqnk683y05r0waw69r4iarsfar";
};
meta.homepage = "https://github.com/Yggdroot/LeaderF/";
};
@ -3444,12 +3444,12 @@ final: prev:
go-nvim = buildVimPluginFrom2Nix {
pname = "go.nvim";
version = "2023-03-18";
version = "2023-03-20";
src = fetchFromGitHub {
owner = "ray-x";
repo = "go.nvim";
rev = "4ddd66affd76ccd29fb60e2abde77f743d5f7449";
sha256 = "1a62dvixny281103cq165yzbklnvz90p4yj5y7pwy54cwn6a5mww";
rev = "933ff9f0d84975122ec62ef98f78511db5c313c1";
sha256 = "02pr6c8ljv34xd9h6y01i71l8nrapspyg1dm8vcybl5jjq85xrmv";
};
meta.homepage = "https://github.com/ray-x/go.nvim/";
};
@ -4223,12 +4223,12 @@ final: prev:
lazy-nvim = buildVimPluginFrom2Nix {
pname = "lazy.nvim";
version = "2023-03-19";
version = "2023-03-20";
src = fetchFromGitHub {
owner = "folke";
repo = "lazy.nvim";
rev = "b306eb3d0f32b792929735c6d528c38d0f1dc0cd";
sha256 = "1say6d6kyb5186rbw65jys8j2b7d7ksv8grxkba7lihbf97zpscq";
rev = "887eb75591520a01548134c4623617b639289d0b";
sha256 = "14kncmkrjgfkw1wynhgqslgybmzalnq9ps07k7kbccpsjmqafggp";
};
meta.homepage = "https://github.com/folke/lazy.nvim/";
};
@ -4859,12 +4859,12 @@ final: prev:
mason-nvim = buildVimPluginFrom2Nix {
pname = "mason.nvim";
version = "2023-03-19";
version = "2023-03-20";
src = fetchFromGitHub {
owner = "williamboman";
repo = "mason.nvim";
rev = "9992c66c2a832a17302ca3179a82516544565f9b";
sha256 = "1yzspxsnk6vlrcl51xksfnhvlg58q8mj66iwqqpk1ddxkx7vl485";
rev = "a192887fd0c29275cf2acb4a83bcbdf63399f8df";
sha256 = "0vqr4sm49x0mcd250mc39nsax49dlzyx9al8nkbxc5k881w4f93f";
};
meta.homepage = "https://github.com/williamboman/mason.nvim/";
};
@ -5319,8 +5319,8 @@ final: prev:
src = fetchFromGitHub {
owner = "folke";
repo = "neodev.nvim";
rev = "7b1e0a371c4b631bc185eb8dcea00bb6005e02b0";
sha256 = "09bh4cixa4ks6rw4qrmdwinwaz7va312abm1wm3bp2a42ralx8da";
rev = "0a8e312923671e78499b2e204f0f678379ba92c1";
sha256 = "1n9l21dcwh2g5rps7kn761qbmdy822q67djlgrlmd9gml45s0klz";
};
meta.homepage = "https://github.com/folke/neodev.nvim/";
};
@ -5351,12 +5351,12 @@ final: prev:
neogit = buildVimPluginFrom2Nix {
pname = "neogit";
version = "2023-03-17";
version = "2023-03-20";
src = fetchFromGitHub {
owner = "TimUntersberger";
repo = "neogit";
rev = "dc02950e0364db853b2ed4a169e38d7de8ec95ad";
sha256 = "0hnrvw63qssx01n1j4qv20xgd66ys2ilpy9j36wqs4gcncchp9ch";
rev = "039ff3212ec43cc4d3332956dfb54e263c8d5033";
sha256 = "17a6lpqv99b89g7kakbzw97hpkqmw729if4j8gq8svza3fjcq2pg";
};
meta.homepage = "https://github.com/TimUntersberger/neogit/";
};
@ -6263,12 +6263,12 @@ final: prev:
nvim-lspconfig = buildVimPluginFrom2Nix {
pname = "nvim-lspconfig";
version = "2023-03-18";
version = "2023-03-20";
src = fetchFromGitHub {
owner = "neovim";
repo = "nvim-lspconfig";
rev = "5a871409199d585b52b69952532e3fb435e64566";
sha256 = "13dr00ms9vghbb979rpd627qd90nfx9afhz8hjrpkhr9qm8jlry0";
rev = "736c39e4bab977f0171c78328415c6402c58e64a";
sha256 = "1079bdrnrlw4qkpibpnkznkpnih71r8zxl2s47ad8hvvr586k9ld";
};
meta.homepage = "https://github.com/neovim/nvim-lspconfig/";
};
@ -6311,12 +6311,12 @@ final: prev:
nvim-metals = buildVimPluginFrom2Nix {
pname = "nvim-metals";
version = "2023-03-17";
version = "2023-03-20";
src = fetchFromGitHub {
owner = "scalameta";
repo = "nvim-metals";
rev = "9e3f9854f1cb3db2a8b1617b8e5847555624f3ff";
sha256 = "0wsvfi43i48bs6i8gx9ipx4x5xrdd179vzyf8666yjnpy2dv50d0";
rev = "51e88e4f5eeadbd92a75cae71c5cbb75f3cb6765";
sha256 = "0lq4dl92wvnql9i5c8kbfja4jzzlzps0v6nmpy7qalrxhfp5gyn2";
};
meta.homepage = "https://github.com/scalameta/nvim-metals/";
};
@ -6335,12 +6335,12 @@ final: prev:
nvim-navic = buildVimPluginFrom2Nix {
pname = "nvim-navic";
version = "2023-03-04";
version = "2023-03-20";
src = fetchFromGitHub {
owner = "smiteshp";
repo = "nvim-navic";
rev = "cdd24539bcf114a499827e9b32869fe74836efe7";
sha256 = "1iwpfls99mibmp8s2zw21hngvhqhnj6v03ddrv17qd2pwgdaarm4";
rev = "f1ffbc3f5736add66c31e02f4c53d238e040600b";
sha256 = "0djb5n86ypd94gb06fgf7p25sina1xfrnb7894v4pga9fc1fl4fp";
};
meta.homepage = "https://github.com/smiteshp/nvim-navic/";
};
@ -6531,32 +6531,32 @@ final: prev:
src = fetchFromGitHub {
owner = "nvim-tree";
repo = "nvim-tree.lua";
rev = "1d79a64a88af47ddbb55f4805ab537d11d5b908e";
sha256 = "u9ZLBL4FY/bkvl4+ofKifyEHM9+KhqeYovhr9VQYG7c=";
rev = "a50723e35f57f89fb67019127a16d90f16edfef8";
sha256 = "0k7q6isrnk9qqymiz5vzkspq5ff5m4bkb66ayn8bsp6v7qdrkzyz";
};
meta.homepage = "https://github.com/nvim-tree/nvim-tree.lua/";
};
nvim-treesitter = buildVimPluginFrom2Nix {
pname = "nvim-treesitter";
version = "2023-03-19";
version = "2023-03-20";
src = fetchFromGitHub {
owner = "nvim-treesitter";
repo = "nvim-treesitter";
rev = "4536156f32b8ab0aab264e3cd7819fc8e3daede4";
sha256 = "1y6lczvsv4bygh79gqbihxsaygmnhin4bwdi59hb7bjgi6xy8j8f";
rev = "25b656a4b771ee7d440e506280b9ae546d6f7233";
sha256 = "02qg57wkrg2if1kbailyy2qw84c1wfa9rmv8cv8ljzxfqhf9f380";
};
meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter/";
};
nvim-treesitter-context = buildVimPluginFrom2Nix {
pname = "nvim-treesitter-context";
version = "2023-03-19";
version = "2023-03-20";
src = fetchFromGitHub {
owner = "nvim-treesitter";
repo = "nvim-treesitter-context";
rev = "c1fa59698850cafa4cae686e652d1512a01dcf3c";
sha256 = "1gmzcw57k8s24wj9llkw7xn45y9cdn6s8dimbjnlpb218z72j00c";
rev = "446a463500ea2ee22c9b44f059b1117997f5aaeb";
sha256 = "0l6jwqg6i0z5w0q3z7956rc3wc3w2h320237clvxvkq3brf33f0a";
};
meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter-context/";
};
@ -6873,6 +6873,18 @@ final: prev:
meta.homepage = "https://github.com/tyru/open-browser.vim/";
};
openscad-nvim = buildVimPluginFrom2Nix {
pname = "openscad.nvim";
version = "2022-04-15";
src = fetchFromGitHub {
owner = "salkin-mada";
repo = "openscad.nvim";
rev = "197ca5ea7ca53702c453f862e7f4734b51c7023e";
sha256 = "1f0xd9gaacg7avrnsyigal4iz8645z50fgpwjfxis9nrjlia7h73";
};
meta.homepage = "https://github.com/salkin-mada/openscad.nvim/";
};
orgmode = buildVimPluginFrom2Nix {
pname = "orgmode";
version = "2023-03-17";

View file

@ -995,6 +995,17 @@
};
meta.homepage = "https://github.com/MunifTanjim/tree-sitter-lua";
};
luadoc = buildGrammar {
language = "luadoc";
version = "40a67ee";
src = fetchFromGitHub {
owner = "amaanq";
repo = "tree-sitter-luadoc";
rev = "40a67ee798eb3c989fffde0277ff6de740ebaf34";
hash = "sha256-vhiUaZms4Je/TBTTepQiuddl0sKodrHcrBCauBPgu7Y=";
};
meta.homepage = "https://github.com/amaanq/tree-sitter-luadoc";
};
luap = buildGrammar {
language = "luap";
version = "bfb38d2";

View file

@ -24,6 +24,7 @@
, git
, gnome
, himalaya
, htop
, jq
, khard
, languagetool
@ -31,6 +32,7 @@
, meson
, nim
, nodePackages
, openscad
, pandoc
, parinfer-rust
, ripgrep
@ -50,6 +52,7 @@
, nodejs
, xdotool
, xorg
, zathura
, zsh
# command-t dependencies
@ -729,6 +732,22 @@ self: super: {
configurePhase = "cd vim";
});
# The plugin depends on either skim-vim or fzf-vim, but we don't want to force the user so we
# avoid choosing one of them and leave it to the user
openscad-nvim = super.openscad-nvim.overrideAttrs (old: {
buildInputs = [ zathura htop openscad ];
patches = [ ./patches/openscad.nvim/program_paths.patch ];
postPatch = ''
substituteInPlace lua/openscad.lua --replace '@zathura-path@' ${zathura}/bin/zathura
substituteInPlace autoload/health/openscad_nvim.vim --replace '@zathura-path@' ${zathura}/bin/zathura
substituteInPlace lua/openscad/terminal.lua --replace '@htop-path@' ${htop}/bin/htop
substituteInPlace autoload/health/openscad_nvim.vim --replace '@htop-path@' ${htop}/bin/htop
substituteInPlace lua/openscad.lua --replace '@openscad-path@' ${openscad}/bin/openscad
'';
});
orgmode = super.orgmode.overrideAttrs (old: {
dependencies = with self; [ (nvim-treesitter.withPlugins (p: [ p.org ])) ];
});

View file

@ -0,0 +1,44 @@
diff --git a/autoload/health/openscad_nvim.vim b/autoload/health/openscad_nvim.vim
index 9022d55..30ef53f 100644
--- a/autoload/health/openscad_nvim.vim
+++ b/autoload/health/openscad_nvim.vim
@@ -7,7 +7,7 @@ function! s:check_nvim_version_minimum() abort
endfunction
function! s:check_zathura_installed() abort
- if !executable('zathura')
+ if !executable('@zathura-path@')
call health#report_error('has(zathura)','install zathura')
else
call health#report_ok("zathura is installed")
@@ -15,7 +15,7 @@ function! s:check_zathura_installed() abort
endfunction
function! s:check_htop_installed() abort
- if !executable('htop')
+ if !executable('@htop-path@')
call health#report_error('has(htop)','install htop')
else
call health#report_ok("htop is installed")
diff --git a/lua/openscad.lua b/lua/openscad.lua
index 7dff2fb..4382003 100644
--- a/lua/openscad.lua
+++ b/lua/openscad.lua
@@ -101,7 +101,7 @@ end
function M.manual()
local path = U.openscad_nvim_root_dir .. U.path_sep .. "help_source" .. U.path_sep .. "openscad-manual.pdf"
- api.nvim_command('silent !zathura --fork ' .. path)
+ api.nvim_command('silent !@zathura-path@ --fork ' .. path)
end
function M.help()
@@ -119,7 +119,7 @@ end
function M.exec_openscad()
-- maybe just use api.jobstart .. instead
- api.nvim_command[[ call jobstart('openscad ' . shellescape(expand('%:p')), {'detach':1}) ]]
+ api.nvim_command[[ call jobstart('@openscad-path@ ' . shellescape(expand('%:p')), {'detach':1}) ]]
end
function M.default_mappings()

View file

@ -578,6 +578,7 @@ https://github.com/sonph/onehalf/,,
https://github.com/rmehri01/onenord.nvim/,main,
https://github.com/tyru/open-browser-github.vim/,,
https://github.com/tyru/open-browser.vim/,,
https://github.com/salkin-mada/openscad.nvim/,HEAD,
https://github.com/nvim-orgmode/orgmode/,,
https://github.com/nyoom-engineering/oxocarbon.nvim/,HEAD,
https://github.com/vuki656/package-info.nvim/,,

View file

@ -0,0 +1,74 @@
{ lib
, fetchFromGitHub
, pkg-config
, meson
, ninja
, gtk4
, libadwaita
, python3Packages
, gobject-introspection
, vulkan-tools
, python3
, wrapGAppsHook
, gdk-pixbuf
, lsb-release
, glxinfo
, vdpauinfo
, clinfo
}:
python3.pkgs.buildPythonApplication rec {
pname = "gpu-viewer";
version = "2.26";
format = "other";
src = fetchFromGitHub {
owner = "arunsivaramanneo";
repo = pname;
rev = "v${version}";
hash = "sha256-3GYJq76g/pU8dt+OMGBeDcw47z5Xv3AGkLsACcBCELs=";
};
nativeBuildInputs = [
pkg-config
meson
ninja
gobject-introspection
wrapGAppsHook
];
buildInputs = [
gtk4
libadwaita
vulkan-tools
gdk-pixbuf
];
pythonPath = with python3Packages; [
pygobject3
click
];
# Prevent double wrapping
dontWrapGApps = true;
postFixup = ''
makeWrapper ${python3.interpreter} $out/bin/gpu-viewer \
--prefix PATH : "${lib.makeBinPath [ clinfo glxinfo lsb-release vdpauinfo vulkan-tools ]}" \
--add-flags "$out/share/gpu-viewer/Files/GPUViewer.py" \
--prefix PYTHONPATH : "$PYTHONPATH" \
--chdir "$out/share/gpu-viewer/Files" \
''${makeWrapperArgs[@]} \
''${gappsWrapperArgs[@]}
'';
meta = with lib; {
homepage = "https://github.com/arunsivaramanneo/GPU-Viewer";
description = "A front-end to glxinfo, vulkaninfo, clinfo and es2_info";
maintainers = with maintainers; [ GaetanLepage ];
license = licenses.gpl3;
platforms = platforms.linux;
};
}

View file

@ -54,8 +54,13 @@ stdenv.mkDerivation rec {
"--with-app-defaults=$(out)/lib/X11/app-defaults"
] ++ lib.optional enableDecLocator "--enable-dec-locator";
# Work around broken "plink.sh".
NIX_LDFLAGS = "-lXmu -lXt -lICE -lX11 -lfontconfig";
env = {
# Work around broken "plink.sh".
NIX_LDFLAGS = "-lXmu -lXt -lICE -lX11 -lfontconfig";
} // lib.optionalAttrs stdenv.hostPlatform.isMusl {
# Various symbols missing without this define: TAB3, NLDLY, CRDLY, BSDLY, FFDLY, CBAUD
NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE";
};
# Hack to get xterm built with the feature of releasing a possible setgid of 'utmp',
# decided by the sysadmin to allow the xterm reporting to /var/run/utmp

View file

@ -15,12 +15,12 @@
buildGoModule rec {
pname = "gitea";
version = "1.18.5";
version = "1.19.0";
# not fetching directly from the git repo, because that lacks several vendor files for the web UI
src = fetchurl {
url = "https://dl.gitea.io/gitea/${version}/gitea-src-${version}.tar.gz";
hash = "sha256-OGPn4fknYfzmuAi6CL8m/Ih4uRNraVDmpBm20qT3lKk=";
hash = "sha256-9nDzXSGYxYw34/Ekmj44VdGLVhRsGL2e5gfyoyPUqGQ=";
};
vendorHash = null;

View file

@ -1,10 +1,10 @@
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 45e55a2..9d18ee4 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -667,7 +667,7 @@ func NewContext() {
diff --git a/modules/setting/server.go b/modules/setting/server.go
index 183906268..fa02e8915 100644
--- a/modules/setting/server.go
+++ b/modules/setting/server.go
@@ -319,7 +319,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
Log.DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
if len(StaticRootPath) == 0 {
- StaticRootPath = AppWorkPath
+ StaticRootPath = "@data@"

View file

@ -0,0 +1,152 @@
{ cmake
, cudaPackages
, fetchFromGitHub
, lib
, ninja
, pkgs
, python3Packages ? { }
, pythonSupport ? false
, stdenv
, symlinkJoin
, which
}:
let
inherit (lib) lists strings;
inherit (cudaPackages) backendStdenv cudaFlags;
cuda-common-redist = with cudaPackages; [
libcublas # cublas_v2.h
libcusolver # cusolverDn.h
libcusparse # cusparse.h
];
cuda-native-redist = symlinkJoin {
name = "cuda-redist";
paths = with cudaPackages; [
cuda_cudart # cuda_runtime.h
cuda_nvcc
] ++ cuda-common-redist;
};
cuda-redist = symlinkJoin {
name = "cuda-redist";
paths = cuda-common-redist;
};
in
stdenv.mkDerivation (finalAttrs: {
name = "tiny-cuda-nn";
version = "1.6";
format = strings.optionalString pythonSupport "setuptools";
src = fetchFromGitHub {
owner = "NVlabs";
repo = finalAttrs.name;
rev = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-qW6Fk2GB71fvZSsfu+mykabSxEKvaikZ/pQQZUycOy0=";
};
nativeBuildInputs = [
cmake
cuda-native-redist
ninja
which
] ++ lists.optionals pythonSupport (with python3Packages; [
pip
setuptools
wheel
]);
buildInputs = [
cuda-redist
] ++ lib.optionals pythonSupport (
with python3Packages; [
pybind11
python
]
);
propagatedBuildInputs = lib.optionals pythonSupport (
with python3Packages; [
torch
]
);
# NOTE: We cannot use pythonImportsCheck for this module because it uses torch to immediately
# initailize CUDA and GPU access is not allowed in the nix build environment.
# NOTE: There are no tests for the C++ library or the python bindings, so we just skip the check
# phase -- we're not missing anything.
doCheck = false;
preConfigure = ''
export TCNN_CUDA_ARCHITECTURES=${
strings.concatStringsSep ";" (lists.map cudaFlags.dropDot cudaFlags.cudaCapabilities)
}
export CUDA_HOME=${cuda-native-redist}
export LIBRARY_PATH=${cuda-native-redist}/lib/stubs:$LIBRARY_PATH
export CC=${backendStdenv.cc}/bin/cc
export CXX=${backendStdenv.cc}/bin/c++
'';
# When building the python bindings, we cannot re-use the artifacts from the C++ build so we
# skip the CMake confurePhase and the buildPhase.
dontUseCmakeConfigure = pythonSupport;
# The configurePhase usually puts you in the build directory, so for the python bindings we
# need to change directories to the source directory.
configurePhase = strings.optionalString pythonSupport ''
runHook preConfigure
mkdir -p $NIX_BUILD_TOP/build
cd $NIX_BUILD_TOP/build
runHook postConfigure
'';
buildPhase = strings.optionalString pythonSupport ''
runHook preBuild
python -m pip wheel \
--no-build-isolation \
--no-clean \
--no-deps \
--no-index \
--verbose \
--wheel-dir $NIX_BUILD_TOP/build \
$NIX_BUILD_TOP/source/bindings/torch
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib
''
# Installing the C++ library just requires copying the static library to the output directory
+ strings.optionalString (!pythonSupport) ''
cp libtiny-cuda-nn.a $out/lib/
''
# Installing the python bindings requires building the wheel and installing it
+ strings.optionalString pythonSupport ''
python -m pip install \
--no-build-isolation \
--no-cache-dir \
--no-deps \
--no-index \
--no-warn-script-location \
--prefix="$out" \
--verbose \
./*.whl
'' + ''
runHook postInstall
'';
passthru = {
inherit cudaPackages;
};
meta = with lib; {
description = "Lightning fast C++/CUDA neural network framework";
homepage = "https://github.com/NVlabs/tiny-cuda-nn";
license = licenses.bsd3;
maintainers = with maintainers; [ connorbaker ];
platforms = platforms.linux;
};
})

View file

@ -8,6 +8,8 @@ buildDunePackage {
inherit (containers) src version doCheck;
duneVersion = "3";
buildInputs = [ dune-configurator ];
checkInputs = [ gen iter qcheck-core ];

View file

@ -5,14 +5,16 @@
}:
buildDunePackage rec {
version = "3.10";
version = "3.11";
pname = "containers";
duneVersion = "3";
src = fetchFromGitHub {
owner = "c-cube";
repo = "ocaml-containers";
rev = "v${version}";
hash = "sha256-eWmju4CD30+wX3sKI8rOUEbqbQygdOtc0U4sb9vYuNA=";
hash = "sha256-tGAsg98/T6VKvG95I4qioabWM3TEKrDKlsrfUJqxCyM=";
};
buildInputs = [ dune-configurator ];

View file

@ -18,20 +18,21 @@ buildDunePackage rec {
minimalOCamlVersion = "4.08";
useDune2 = true;
duneVersion = "3";
src = fetchFromGitHub {
owner = "fdopen";
repo = "ppx_cstubs";
rev = version;
sha256 = "sha256-qMmwRWCIfNyhCQYPKLiufnb57sTR3P+WInOqtPDywFs=";
hash = "sha256-qMmwRWCIfNyhCQYPKLiufnb57sTR3P+WInOqtPDywFs=";
};
nativeBuildInputs = [ cppo findlib ];
nativeBuildInputs = [ cppo ];
buildInputs = [
bigarray-compat
containers
findlib
integers
num
ppxlib

View file

@ -4,21 +4,37 @@
, greenlet
, pytest
, decorator
, twisted
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pytest-twisted";
version = "1.13.2";
version = "1.14.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "cee2320becc5625050ab221b8f38533e636651a24644612f4726891fdf1f1847";
sha256 = "sha256-IJv1pkUs+/th3o8BWQLBTsgSZACRFQcHS7LuTOjf4xM=";
};
buildInputs = [ pytest ];
buildInputs = [
pytest
];
propagatedBuildInputs = [ greenlet decorator ];
propagatedBuildInputs = [
decorator
greenlet
];
nativeCheckInputs = [
pytestCheckHook
twisted
];
pythonImportsCheck = [
"pytest_twisted"
];
meta = with lib; {
description = "A twisted plugin for py.test";

View file

@ -4,16 +4,16 @@ let
# comments with variant added for update script
# ./update-zen.py zen
zenVariant = {
version = "6.2.6"; #zen
version = "6.2.7"; #zen
suffix = "zen1"; #zen
sha256 = "1cbga42b4kz03kgf5vxzh93fa8kgszffki5pwalxj6a2rab8888c"; #zen
sha256 = "1giy45ndzs4pfvwlc1p8zb7qci86ampbjwl93jwxcdn76k8gygzh"; #zen
isLqx = false;
};
# ./update-zen.py lqx
lqxVariant = {
version = "6.2.6"; #lqx
version = "6.2.7"; #lqx
suffix = "lqx1"; #lqx
sha256 = "1b454badr366pbxiyz7h2n47405wy5pa35rdkk1is8q574yf6scy"; #lqx
sha256 = "0dk79cglqrbsmlz9vimd714km5v717r1066r4bas20r3gi0zlzhi"; #lqx
isLqx = true;
};
zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // {

View file

@ -0,0 +1,55 @@
{ lib, stdenv, fetchurl, autoPatchelfHook, bzip2 }:
stdenv.mkDerivation rec {
pname = "fastnetmon-advanced";
version = "2.0.335";
src = fetchurl {
url = "https://repo.fastnetmon.com/fastnetmon_ubuntu_jammy/pool/fastnetmon/f/fastnetmon/fastnetmon_${version}_amd64.deb";
hash = "sha256-2WdCQX0AiLTPGM9flVSXgKMrTGCwSXk9IfyS5SRKroY=";
};
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
bzip2
];
unpackPhase = ''
ar xf $src
tar xf data.tar.xz
# "These binaries are not part of FastNetMon and we shipped them by accident. They will be removed in next stable build"
rm opt/fastnetmon/app/bin/{generate_rsa_keys,license_app,fastnetmon_license_server}
# ships with both 2_0_0 and 2_3_0 but the shared objects are not versioned and only 2_3_0 has the necessary symbols
rm -rf opt/fastnetmon/libraries/libclickhouse_2_0_0/
# unused libraries, which have additional dependencies
rm opt/fastnetmon/libraries/gcc1210/lib/libgccjit.so.0.0.1
rm opt/fastnetmon/libraries/poco_1_10_0/lib/libPocoCryptod.so.70
rm opt/fastnetmon/libraries/poco_1_10_0/lib/libPocoCrypto.so.70
rm opt/fastnetmon/libraries/poco_1_10_0/lib/libPocoJWTd.so.70
rm opt/fastnetmon/libraries/poco_1_10_0/lib/libPocoJWT.so.70
rm opt/fastnetmon/libraries/wkhtmltopdf-0.12.3/wkhtmltox/lib/libwkhtmltox.so.0.12.3
'';
installPhase = ''
mkdir -p $out/libexec/fastnetmon
cp -r opt/fastnetmon/app/bin $out/bin
cp -r opt/fastnetmon/libraries $out/libexec/fastnetmon
addAutoPatchelfSearchPath $out/libexec/fastnetmon/libraries
'';
meta = with lib; {
description = "A high performance DDoS detector / sensor - commercial edition";
homepage = "https://fastnetmon.com";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ yuka ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
};
}

View file

@ -3822,6 +3822,8 @@ with pkgs;
tensorflow-lite = callPackage ../development/libraries/science/math/tensorflow-lite { };
tiny-cuda-nn = callPackage ../development/libraries/science/math/tiny-cuda-nn { };
tezos-rust-libs = callPackage ../development/libraries/tezos-rust-libs { };
behave = with python3Packages; toPythonApplication behave;
@ -4944,6 +4946,8 @@ with pkgs;
stdenv = gcc9Stdenv;
};
gpu-viewer = callPackage ../applications/misc/gpu-viewer { };
greg = callPackage ../applications/audio/greg {
pythonPackages = python3Packages;
};
@ -24772,6 +24776,8 @@ with pkgs;
exim = callPackage ../servers/mail/exim { };
fastnetmon-advanced = callPackage ../servers/fastnetmon-advanced { };
fcgiwrap = callPackage ../servers/fcgiwrap { };
fedigroups = callPackage ../servers/fedigroups {

View file

@ -11702,6 +11702,12 @@ self: super: with self; {
timm = callPackage ../development/python-modules/timm { };
tiny-cuda-nn = toPythonModule (pkgs.tiny-cuda-nn.override {
cudaPackages = self.torch.cudaPackages;
python3Packages = self;
pythonSupport = true;
});
tinycss2 = callPackage ../development/python-modules/tinycss2 { };
tinycss = callPackage ../development/python-modules/tinycss { };