Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-11-09 00:01:30 +00:00 committed by GitHub
commit 707b006bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 4058 additions and 7705 deletions

View File

@ -6748,6 +6748,12 @@
githubId = 10626;
name = "Andreas Wagner";
};
lrewega = {
email = "lrewega@c32.ca";
github = "lrewega";
githubId = 639066;
name = "Luke Rewega";
};
lromor = {
email = "leonardo.romor@gmail.com";
github = "lromor";

View File

@ -15,7 +15,7 @@ let
(optionalString rule.noLog "nolog")
(optionalString rule.persist "persist")
(optionalString rule.keepEnv "keepenv")
"setenv { SSH_AUTH_SOCK ${concatStringsSep " " rule.setEnv} }"
"setenv { SSH_AUTH_SOCK TERMINFO TERMINFO_DIRS ${concatStringsSep " " rule.setEnv} }"
];
mkArgs = rule:

View File

@ -5,19 +5,6 @@ with lib;
let
cfg = config.services.plausible;
# FIXME consider using LoadCredential as soon as it actually works.
envSecrets = ''
ADMIN_USER_PWD="$(<${cfg.adminUser.passwordFile})"
export ADMIN_USER_PWD # separate export to make `set -e` work
SECRET_KEY_BASE="$(<${cfg.server.secretKeybaseFile})"
export SECRET_KEY_BASE # separate export to make `set -e` work
${optionalString (cfg.mail.smtp.passwordFile != null) ''
SMTP_USER_PWD="$(<${cfg.mail.smtp.passwordFile})"
export SMTP_USER_PWD # separate export to make `set -e` work
''}
'';
in {
options.services.plausible = {
enable = mkEnableOption "plausible";
@ -184,13 +171,15 @@ in {
enable = true;
};
services.epmd.enable = true;
systemd.services = mkMerge [
{
plausible = {
inherit (pkgs.plausible.meta) description;
documentation = [ "https://plausible.io/docs/self-hosting" ];
wantedBy = [ "multi-user.target" ];
after = optional cfg.database.postgres.setup "plausible-postgres.service";
after = optionals cfg.database.postgres.setup [ "postgresql.service" "plausible-postgres.service" ];
requires = optional cfg.database.clickhouse.setup "clickhouse.service"
++ optionals cfg.database.postgres.setup [
"postgresql.service"
@ -200,7 +189,7 @@ in {
environment = {
# NixOS specific option to avoid that it's trying to write into its store-path.
# See also https://github.com/lau/tzdata#data-directory-and-releases
TZDATA_DIR = "/var/lib/plausible/elixir_tzdata";
STORAGE_DIR = "/var/lib/plausible/elixir_tzdata";
# Configuration options from
# https://plausible.io/docs/self-hosting-configuration
@ -231,28 +220,29 @@ in {
path = [ pkgs.plausible ]
++ optional cfg.database.postgres.setup config.services.postgresql.package;
script = ''
export CONFIG_DIR=$CREDENTIALS_DIRECTORY
# setup
${pkgs.plausible}/createdb.sh
${pkgs.plausible}/migrate.sh
${optionalString cfg.adminUser.activate ''
if ! ${pkgs.plausible}/init-admin.sh | grep 'already exists'; then
psql -d plausible <<< "UPDATE users SET email_verified=true;"
fi
''}
plausible start
'';
serviceConfig = {
DynamicUser = true;
PrivateTmp = true;
WorkingDirectory = "/var/lib/plausible";
StateDirectory = "plausible";
ExecStartPre = "@${pkgs.writeShellScript "plausible-setup" ''
set -eu -o pipefail
${envSecrets}
${pkgs.plausible}/createdb.sh
${pkgs.plausible}/migrate.sh
${optionalString cfg.adminUser.activate ''
if ! ${pkgs.plausible}/init-admin.sh | grep 'already exists'; then
psql -d plausible <<< "UPDATE users SET email_verified=true;"
fi
''}
''} plausible-setup";
ExecStart = "@${pkgs.writeShellScript "plausible" ''
set -eu -o pipefail
${envSecrets}
plausible start
''} plausible";
LoadCredential = [
"ADMIN_USER_PWD:${cfg.adminUser.passwordFile}"
"SECRET_KEY_BASE:${cfg.server.secretKeybaseFile}"
] ++ lib.optionals (cfg.mail.smtp.passwordFile != null) [ "SMTP_USER_PWD:${cfg.mail.smtp.passwordFile}"];
};
};
}
@ -260,20 +250,22 @@ in {
# `plausible' requires the `citext'-extension.
plausible-postgres = {
after = [ "postgresql.service" ];
bindsTo = [ "postgresql.service" ];
requiredBy = [ "plausible.service" ];
partOf = [ "plausible.service" ];
serviceConfig.Type = "oneshot";
unitConfig.ConditionPathExists = "!/var/lib/plausible/.db-setup";
script = ''
mkdir -p /var/lib/plausible/
serviceConfig = {
Type = "oneshot";
User = config.services.postgresql.superUser;
RemainAfterExit = true;
};
script = with cfg.database.postgres; ''
PSQL() {
/run/wrappers/bin/sudo -Hu postgres ${config.services.postgresql.package}/bin/psql --port=5432 "$@"
${config.services.postgresql.package}/bin/psql --port=5432 "$@"
}
PSQL -tAc "CREATE ROLE plausible WITH LOGIN;"
PSQL -tAc "CREATE DATABASE plausible WITH OWNER plausible;"
PSQL -d plausible -tAc "CREATE EXTENSION IF NOT EXISTS citext;"
touch /var/lib/plausible/.db-setup
# check if the database already exists
if ! PSQL -lqt | ${pkgs.coreutils}/bin/cut -d \| -f 1 | ${pkgs.gnugrep}/bin/grep -qw ${dbname} ; then
PSQL -tAc "CREATE ROLE plausible WITH LOGIN;"
PSQL -tAc "CREATE DATABASE ${dbname} WITH OWNER plausible;"
PSQL -d ${dbname} -tAc "CREATE EXTENSION IF NOT EXISTS citext;"
fi
'';
};
})

View File

@ -85,6 +85,14 @@ import ./make-test-python.nix (
# ../../pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch
with subtest("recursive calls to doas from subprocesses should succeed"):
machine.succeed('doas -u test0 sh -c "doas -u test0 true"')
with subtest("test0 should inherit TERMINFO_DIRS from the user environment"):
dirs = machine.succeed(
"su - test0 -c 'doas -u root $SHELL -c \"echo \$TERMINFO_DIRS\"'"
)
if not "test0" in dirs:
raise Exception(f"user profile TERMINFO_DIRS is not preserved: {dirs}")
'';
}
)

View File

@ -9,13 +9,13 @@
stdenv.mkDerivation {
pname = "chia-plotter";
version = "unstable-2021-07-12";
version = "1.1.7";
src = fetchFromGitHub {
owner = "madMAx43v3r";
repo = "chia-plotter";
rev = "974d6e5f1440f68c48492122ca33828a98864dfc";
sha256 = "0dliswvqmi3wq9w8jp0sb0z74n5k37608sig6r60z206g2bwhjja";
rev = "18cad340858f0dbcc8dafd0bda1ce1af0fe58c65";
sha256 = "sha256-lXjeqcjn3+LtnVYngdM1T3on7V7wez4oOAZ0RpKJXMM=";
fetchSubmodules = true;
};

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper, fetchpatch
{ stdenv, lib, fetchFromGitHub, makeWrapper
, pkg-config, which, perl, libXrandr
, cairo, dbus, systemd, gdk-pixbuf, glib, libX11, libXScrnSaver
, wayland, wayland-protocols

View File

@ -1,14 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 347d325..dce95a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -489,7 +489,8 @@ fi
############################################################################
AM_ICONV
AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.19])
+AM_GNU_GETTEXT_VERSION([0.19.6])
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
LDFLAGS="$LDFLAGS $LIBINTL $LIBICONV"
############################################################################

View File

@ -1,21 +1,19 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, automake, autoconf, libtool, gettext
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, gettext
, which, xorg, libX11, libXext, libXinerama, libXpm, libXft, libXau, libXdmcp
, libXmu, libpng, libjpeg, expat, xorgproto, librsvg, freetype, fontconfig }:
stdenv.mkDerivation rec {
pname = "jwm";
version = "1685";
version = "2.4.0";
src = fetchFromGitHub {
owner = "joewing";
repo = "jwm";
rev = "s${version}";
sha256 = "1kyvy022sij898g2hm5spy5vq0kw6aqd7fsnawl2xyh06gwh29wg";
rev = "v${version}";
sha256 = "19fnrlw05njib13ljh7pmi48myfclra1xhy4b6hi74c6w6yz2fgj";
};
patches = [ ./0001-Fix-Gettext-Requirement.patch ];
nativeBuildInputs = [ pkg-config automake autoconf libtool gettext which ];
nativeBuildInputs = [ pkg-config gettext which autoreconfHook ];
buildInputs = [
libX11
@ -38,12 +36,10 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
preConfigure = "./autogen.sh";
meta = {
homepage = "http://joewing.net/projects/jwm/";
description = "Joe's Window Manager is a light-weight X11 window manager";
license = lib.licenses.gpl2;
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.romildo ];
};

View File

@ -8,20 +8,22 @@
stdenv.mkDerivation rec {
pname = "gcc-arm-embedded";
version = "10.3.1";
release = "10.3-2021.07";
release = "10.3-2021.10";
suffix = {
aarch64-darwin = "mac"; # use intel binaries via rosetta
aarch64-linux = "aarch64-linux";
x86_64-darwin = "mac-10.14.6";
x86_64-darwin = "mac";
x86_64-linux = "x86_64-linux";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
src = fetchurl {
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${release}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2";
sha256 = {
aarch64-linux = "0y4nyrff5bq90v44z2h90gqgl18bs861i9lygx4z89ym85jycx9s";
x86_64-darwin = "1r3yidmgx1xq1f19y2c5njf2g95vs9cssmmsxsb68qm192r58i8a";
x86_64-linux = "1skcalz1sr0hhpjcl8qjsqd16n2w0zrbnlrbr8sx0g728kiqsnwc";
aarch64-darwin = "0fr8pki2g4bfk1rk90dzwql37d0b71ngzs9zyx0g2jainan3sqgv";
aarch64-linux = "020j8gkzc0i0b74vz98gvngnwjm5222j1gk5nswfk6587krba1gn";
x86_64-darwin = "0fr8pki2g4bfk1rk90dzwql37d0b71ngzs9zyx0g2jainan3sqgv";
x86_64-linux = "18y92vpl22hf74yqdvmpw8adrkl92s4crzzs6avm05md37qb9nwp";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
};
@ -49,6 +51,6 @@ stdenv.mkDerivation rec {
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
maintainers = with maintainers; [ prusnak ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
};
}

View File

@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
subdir = "9-2020q2";
suffix = {
aarch64-darwin = "mac"; # use intel binaries via rosetta
aarch64-linux = "aarch64-linux";
x86_64-darwin = "mac";
x86_64-linux = "x86_64-linux";
@ -20,6 +21,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${release}-${suffix}.tar.bz2";
sha256 = {
aarch64-darwin = "1ils9z16wrvglh72m428y5irmd36biq79yj86756whib8izbifdv";
aarch64-linux = "1b5q2y710hy7lddj8vj3zl54gfl74j30kx3hk3i81zrcbv16ah8z";
x86_64-darwin = "1ils9z16wrvglh72m428y5irmd36biq79yj86756whib8izbifdv";
x86_64-linux = "07zi2yr5gvhpbij5pnj49zswb9g2gw7zqp4xwwniqmq477h2xp2s";
@ -50,6 +52,6 @@ stdenv.mkDerivation rec {
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
maintainers = with maintainers; [ prusnak ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
};
}

View File

@ -2778,7 +2778,6 @@ broken-packages:
- language-typescript
- language-vhdl
- language-webidl
- lapack-ffi
- LargeCardinalHierarchy
- Lastik
- latest-npm-version

View File

@ -1,10 +1,10 @@
{ self, callPackage, lib }:
callPackage ./default.nix {
inherit self;
version = "2.0.5-2021-07-27";
rev = "3a654999c6f00de4cb9e61232d23579442e544a0";
version = "2.0.5-2021-10-02";
rev = "d3294fa63b344173db68dd612c6d3801631e28d4";
isStable = true;
sha256 = "0q187vn6bspn9i33hrvfy59mh83nd8jjmik5qkkkc3vls13jxr6z";
sha256 = "0ja6x7bv3iqnf6m8xk6qp1dgan2b7mys0ff86dw671fqqrfw28fn";
extraMeta = { # this isn't precise but it at least stops the useless Hydra build
platforms = with lib; filter (p: !hasPrefix "aarch64-" p)
(platforms.linux ++ platforms.darwin);

View File

@ -1,8 +1,8 @@
{ self, callPackage }:
callPackage ./default.nix {
inherit self;
version = "2.1.0-2021-08-12";
rev = "8ff09d9f5ad5b037926be2a50dc32b681c5e7597";
version = "2.1.0-2021-10-27";
rev = "b4b2dce9fc3ffaaaede39b36d06415311e2aa516";
isStable = false;
sha256 = "18wp8sgmiwlslnvgs35cy35ji2igksyfm3f8hrx07hqmsq2d77vr";
sha256 = "185s071aa0yffz8npgdxj7l98cs987vddb2l5pzfcdqfj41gn55q";
}

View File

@ -1,14 +0,0 @@
diff --git a/src/Makefile b/src/Makefile
index 2538503f..7e6380da 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -320,7 +320,9 @@ ifeq (Darwin,$(TARGET_SYS))
$(error missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY)
endif
TARGET_STRIP+= -x
+ ifneq (arm64,$(shell uname -m))
TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL
+ endif
TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC
TARGET_DYNXLDOPTS=
TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER)

View File

@ -51,10 +51,6 @@ stdenv.mkDerivation rec {
luaversion = "5.1";
# Fix for pcall on aarch64-darwin.
# Upstream issue: https://github.com/LuaJIT/LuaJIT/issues/698
patches = lib.optionals (stdenv.hostPlatform.system == "aarch64-darwin") [ ./aarch64-darwin-disable-unwind-external.patch ];
postPatch = ''
substituteInPlace Makefile --replace ldconfig :
if test -n "''${dontStrip-}"; then

View File

@ -39,10 +39,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
glib
meson
ninja
pkg-config
spice-protocol
python3
python3.pkgs.six
python3.pkgs.pyparsing
@ -66,6 +66,7 @@ stdenv.mkDerivation rec {
orc
pixman
python3.pkgs.pyparsing
spice-protocol
zlib
];

View File

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, cython, pytest, numpy }:
{ lib, buildPythonPackage, pythonOlder, fetchFromGitHub, cython, pytest, importlib-resources, numpy }:
buildPythonPackage rec {
pname = "pyjet";
@ -13,7 +13,11 @@ buildPythonPackage rec {
};
nativeBuildInputs = [ cython ];
propagatedBuildInputs = [ numpy ];
propagatedBuildInputs = [
numpy
] ++ lib.optionals (pythonOlder "3.9") [
importlib-resources
];
checkInputs = [ pytest ];
checkPhase = ''

View File

@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "unidecode";
version = "1.3.1";
version = "1.3.2";
disabled = pythonOlder "3.5";
@ -22,7 +22,9 @@ buildPythonPackage rec {
pytestCheckHook
];
pythonImportsCheck = [ "unidecode" ];
pythonImportsCheck = [
"unidecode"
];
meta = with lib; {
homepage = "https://pypi.python.org/pypi/Unidecode/";

View File

@ -9,15 +9,15 @@
buildGoModule rec {
pname = "buf";
version = "0.54.1";
version = "1.0.0-rc7";
src = fetchFromGitHub {
owner = "bufbuild";
repo = pname;
rev = "v${version}";
sha256 = "sha256-v8n1K2YrN8o4IPA2u6Sg5zsOM08nppg29vlU6ycMj9U=";
sha256 = "sha256-ufXz9+WI4NARkQg36mPhGncL7G9fWjDX9Ka/EJdsTvk=";
};
vendorSha256 = "sha256-WLQ8Bw/UgRVTFEKpDbv6VZkMHQm2tgxekH3J7Sd5vC8=";
vendorSha256 = "sha256-wycrRCL7Mjx0QR5Y64WylpmDtKNh010mNxWAg6ekrds=";
patches = [
# Skip a test that requires networking to be available to work.
@ -47,9 +47,7 @@ buildGoModule rec {
for FILE in \
"buf" \
"protoc-gen-buf-breaking" \
"protoc-gen-buf-lint" \
"protoc-gen-buf-check-breaking" \
"protoc-gen-buf-check-lint"; do
"protoc-gen-buf-lint"; do
cp "$GOPATH/bin/$FILE" "$out/bin/"
done
@ -63,6 +61,6 @@ buildGoModule rec {
changelog = "https://github.com/bufbuild/buf/releases/tag/v${version}";
description = "Create consistent Protobuf APIs that preserve compatibility and comply with design best-practices";
license = licenses.asl20;
maintainers = with maintainers; [ raboof jk ];
maintainers = with maintainers; [ raboof jk lrewega ];
};
}

View File

@ -1,15 +1,15 @@
{ stdenv, coreutils, lib, installShellFiles, zlib, autoPatchelfHook, fetchurl }:
let
version = "0.0.7";
version = "0.0.8";
assets = {
x86_64-darwin = {
asset = "scala-cli-x86_64-apple-darwin.gz";
sha256 = "0v6vlmw1zrzvbpa59y4cfv74mx56lyx109vk9cb942pyiv0ia6gf";
sha256 = "14bf1zwvfq86vh00qlf8jf4sb82p9jakrmwqhnv9p0x13lq56xm5";
};
x86_64-linux = {
asset = "scala-cli-x86_64-pc-linux.gz";
sha256 = "1xdkvjfw550lpjw5fsrv7mbnx5i8ix8lrxcd31yipm8p9g4vjcdn";
sha256 = "01dhcj6q9c87aqpz8vy1kwaa1qqq9bh43rkx2sabhnfrzj4vypjr";
};
};
in

View File

@ -1,19 +1,27 @@
{ lib
, buildPythonPackage
, click
, python3
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
let
py = python3.override {
packageOverrides = self: super: {
# newest version doesn't support click >8.0 https://github.com/alanhamlett/pip-update-requirements/issues/38
click = self.callPackage ../../../development/python-modules/click/7.nix { };
};
};
inherit (py.pkgs) buildPythonApplication click pytestCheckHook;
in
buildPythonApplication rec {
pname = "pur";
version = "5.4.1";
version = "5.4.2";
src = fetchFromGitHub {
owner = "alanhamlett";
repo = "pip-update-requirements";
rev = version;
sha256 = "sha256-a2wViLJW+UXgHcURxr4irFVkH8STH84AVcwQIkvH+Fg=";
sha256 = "sha256-coJO9AYm0Qx0arMf/e+pZFG/VxK6bnxxXRgw7x7V2hY=";
};
propagatedBuildInputs = [

View File

@ -4666,6 +4666,18 @@ final: prev:
meta.homepage = "https://github.com/kristijanhusak/orgmode.nvim/";
};
package-info-nvim = buildVimPluginFrom2Nix {
pname = "package-info.nvim";
version = "2021-10-30";
src = fetchFromGitHub {
owner = "vuki656";
repo = "package-info.nvim";
rev = "0572250a6b69f01416399f2f581aa87c17e03810";
sha256 = "0z26i2h42vjsc5fkikfi6w7d7fnf6m3j5m7a73hi9rdbw389b2ay";
};
meta.homepage = "https://github.com/vuki656/package-info.nvim/";
};
packer-nvim = buildVimPluginFrom2Nix {
pname = "packer.nvim";
version = "2021-11-03";
@ -5207,6 +5219,18 @@ final: prev:
meta.homepage = "https://github.com/saltstack/salt-vim/";
};
SchemaStore-nvim = buildVimPluginFrom2Nix {
pname = "SchemaStore.nvim";
version = "2021-11-08";
src = fetchFromGitHub {
owner = "b0o";
repo = "SchemaStore.nvim";
rev = "29116d254c8fa4138cdbeac2beb9dedac6b52dcd";
sha256 = "0jdzkbj6p8d84w6hfpwcdc0qzdrwzp7gqdqxgwl6nwkwm10ahwgm";
};
meta.homepage = "https://github.com/b0o/SchemaStore.nvim/";
};
scrollbar-nvim = buildVimPluginFrom2Nix {
pname = "scrollbar.nvim";
version = "2021-06-04";

View File

@ -36,6 +36,7 @@ artur-shaik/vim-javacomplete2
autozimu/LanguageClient-neovim
axelf4/vim-strip-trailing-whitespace
ayu-theme/ayu-vim
b0o/SchemaStore.nvim@main
b3nj5m1n/kommentary@main
bakpakin/fennel.vim
bazelbuild/vim-bazel
@ -882,6 +883,7 @@ vmchale/dhall-vim
vn-ki/coc-clap
voldikss/vim-floaterm
VundleVim/Vundle.vim
vuki656/package-info.nvim
w0ng/vim-hybrid
wakatime/vim-wakatime
wannesm/wmgraphviz.vim

View File

@ -198,8 +198,8 @@ let
'';
linkVimlPlugin = plugin: packageName: dir: ''
mkdir -p $out/pack/${packageName}/${dir}/${lib.getName plugin}
ln -sf ${plugin}/${rtpPath}/* $out/pack/${packageName}/${dir}/${lib.getName plugin}
mkdir -p $out/pack/${packageName}/${dir}
ln -sf ${plugin}/${rtpPath} $out/pack/${packageName}/${dir}/${lib.getName plugin}
'';
link = pluginPath: if hasLuaModule pluginPath

View File

@ -2,7 +2,7 @@
buildGoModule rec {
pname = "caddy";
version = "2.4.5";
version = "2.4.6";
subPackages = [ "cmd/caddy" ];
@ -10,10 +10,10 @@ buildGoModule rec {
owner = "caddyserver";
repo = pname;
rev = "v${version}";
sha256 = "sha256-/DZnIXAvhCaXFl4DvYP4LSFQQytzj6HWYsmqx5T8GNM=";
sha256 = "sha256-xNCxzoNpXkj8WF9+kYJfO18ux8/OhxygkGjA49+Q4vY=";
};
vendorSha256 = "sha256-ZevSZ8zTGtkrrJF0xvAtxCgP0CsxcORqD40LkMQ0aWc=";
vendorSha256 = "sha256-NomgHqIiugSISbEtvIbJDn5GRn6Dn72adLPkAvLbUQU=";
passthru.tests = { inherit (nixosTests) caddy; };

View File

@ -5,43 +5,35 @@
, glibcLocales
, cacert
, mkYarnModules
, fetchYarnDeps
, nodejs
, fetchpatch
, nixosTests
}:
let
pname = "plausible";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "plausible";
repo = "analytics";
rev = "v${version}";
sha256 = "03lm1f29gwwixnhgjish5bhi3m73qyp71ns2sczdnwnbhrw61zps";
sha256 = "1d31y7mwvml17w97dm5c4312n0ciq39kf4hz3g80hdzbbn72mi4q";
};
# TODO consider using `mix2nix` as soon as it supports git dependencies.
mixFodDeps = beamPackages.fetchMixDeps {
pname = "${pname}-deps";
inherit src version;
sha256 = "1x0if0ifk272vcqjlgf097pxsw13bhwy8vs0b89l0bssx1bzygsi";
# We need ecto 3.6 as this version checks whether the database exists before
# trying to create it. The creation attempt would always require super-user privileges
# and since 3.6 this isn't the case anymore.
patches = [
./ecto_sql-fix.patch
./plausible-Bump-clickhouse_ecto-dependency-to-be-compatible-with-ecto-3.6.patch
];
sha256 = "1ikcskp4gvvdprl65x1spijdc8dz6klnrnkvgy2jbk0b3d7yn1v5";
};
yarnDeps = mkYarnModules {
pname = "${pname}-yarn-deps";
inherit version;
packageJSON = ./package.json;
yarnNix = ./yarn.nix;
yarnLock = ./yarn.lock;
yarnNix = ./yarn.nix;
preBuild = ''
mkdir -p tmp/deps
cp -r ${mixFodDeps}/phoenix tmp/deps/phoenix
@ -57,19 +49,6 @@ beamPackages.mixRelease {
nativeBuildInputs = [ nodejs ];
patches = [
# Allow socket-authentication against postgresql. Upstream PR is
# https://github.com/plausible/analytics/pull/1052
(fetchpatch {
url = "https://github.com/Ma27/analytics/commit/f2ee5892a6c3e1a861d69ed30cac43e05e9cd36f.patch";
sha256 = "sha256-JvJ7xlGw+tHtWje+jiQChVC4KTyqqdq2q+MIcOv/k1o=";
})
# Ensure that `tzdata` doesn't write into its store-path
# https://github.com/plausible/analytics/pull/1096, but rebased onto 1.3.0
./tzdata-rebased.patch
];
passthru = {
tests = { inherit (nixosTests) plausible; };
updateScript = ./update.sh;

View File

@ -1,13 +0,0 @@
diff --git a/mix.exs b/mix.exs
index f6e3b9a..67687d1 100644
--- a/mix.exs
+++ b/mix.exs
@@ -52,7 +52,7 @@ defmodule Plausible.MixProject do
[
{:bcrypt_elixir, "~> 2.0"},
{:cors_plug, "~> 1.5"},
- {:ecto_sql, "~> 3.0"},
+ {:ecto_sql, "~> 3.6"},
{:elixir_uuid, "~> 1.2"},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},

View File

@ -3,45 +3,55 @@
"license": "MIT",
"scripts": {
"deploy": "$(npm bin)/webpack --mode production",
"watch": "$(npm bin)/webpack --mode development --watch"
"watch": "$(npm bin)/webpack --mode development --watch",
"format": "$(npm bin)/prettier --write {css,js}/**",
"check-format": "$(npm bin)/prettier --check {css,js}/**",
"lint": "$(npm bin)/eslint js/**"
},
"dependencies": {
"@babel/core": "^7.11.1",
"@babel/preset-env": "^7.11.0",
"@babel/preset-react": "^7.10.4",
"@tailwindcss/aspect-ratio": "^0.2.0",
"@tailwindcss/forms": "^0.2.1",
"@tailwindcss/typography": "^0.3.1",
"abortcontroller-polyfill": "^1.5.0",
"alpinejs": "^2.7.3",
"autoprefixer": "^9.8.6",
"babel-loader": "^8.1.0",
"chart.js": "^2.9.3",
"copy-webpack-plugin": "^6.0.3",
"css-loader": "^3.6.0",
"@babel/core": "^7.14.3",
"@babel/preset-env": "^7.14.4",
"@babel/preset-react": "^7.13.13",
"@headlessui/react": "^1.3.0",
"@heroicons/react": "^1.0.1",
"@juggle/resize-observer": "^3.3.1",
"@kunukn/react-collapse": "^2.2.9",
"@tailwindcss/aspect-ratio": "^0.2.1",
"@tailwindcss/forms": "^0.3.2",
"@tailwindcss/typography": "^0.4.1",
"abortcontroller-polyfill": "^1.7.3",
"alpinejs": "^2.8.2",
"autoprefixer": "^10.2.6",
"babel-loader": "^8.2.2",
"chart.js": "^3.3.2",
"classnames": "^2.3.1",
"copy-webpack-plugin": "^9.0.0",
"css-loader": "^5.2.6",
"css-minimizer-webpack-plugin": "^3.0.1",
"datamaps": "^0.5.9",
"iframe-resizer": "^4.3.1",
"mini-css-extract-plugin": "^0.8.2",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"debounce-promise": "^3.1.2",
"downshift": "^6.1.3",
"iframe-resizer": "^4.3.2",
"mini-css-extract-plugin": "^1.6.0",
"phoenix": "file:../../tmp/deps/phoenix",
"phoenix_html": "file:../../tmp/deps/phoenix_html",
"postcss": "^7.0.35",
"postcss-loader": "^4.0.4",
"postcss": "^8.3.0",
"postcss-loader": "^6.1.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-flatpickr": "^3.10.5",
"react-flatpickr": "3.10.5",
"react-flip-move": "^3.0.4",
"react-router-dom": "^5.2.0",
"react-transition-group": "^4.4.1",
"tailwindcss": "2.0.1-compat",
"terser-webpack-plugin": "^4.2.3",
"url-search-params-polyfill": "^8.0.0",
"webpack": "4.39.2",
"webpack-cli": "^3.3.12"
"react-transition-group": "^4.4.2",
"tailwindcss": "^2.1.2",
"terser-webpack-plugin": "^5.1.2",
"url-search-params-polyfill": "^8.1.1",
"webpack": "5.38.1",
"webpack-cli": "^4.7.0"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^7.2.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^7.0.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
@ -50,8 +60,9 @@
"eslint-plugin-react-hooks": "^4.2.0",
"stylelint": "^13.8.0",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^20.0.0"
"stylelint-config-standard": "^20.0.0",
"webpack-bundle-analyzer": "^4.4.2"
},
"name": "plausible",
"version": "v1.3.0"
"version": "v1.4.0"
}

View File

@ -1,26 +0,0 @@
From 127a77882879e5cdf32d908ee3b1b6cbdc9e482e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
Date: Wed, 14 Jul 2021 01:20:29 +0200
Subject: [PATCH] Bump `clickhouse_ecto` dependency to be compatible with ecto
3.6
---
mix.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mix.lock b/mix.lock
index ecae8ac..d42af1e 100644
--- a/mix.lock
+++ b/mix.lock
@@ -12,7 +12,7 @@
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
"cachex": {:hex, :cachex, "3.3.0", "6f2ebb8f27491fe39121bd207c78badc499214d76c695658b19d6079beeca5c2", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "d90e5ee1dde14cef33f6b187af4335b88748b72b30c038969176cd4e6ccc31a1"},
"certifi": {:hex, :certifi, "2.6.1", "dbab8e5e155a0763eea978c913ca280a6b544bfa115633fa20249c3d396d9493", [:rebar3], [], "hexpm", "524c97b4991b3849dd5c17a631223896272c6b0af446778ba4675a1dff53bb7e"},
- "clickhouse_ecto": {:git, "https://github.com/plausible/clickhouse_ecto.git", "b30ccc93a4101a25ff0bba92113e18d8a9a8b28e", []},
+ "clickhouse_ecto": {:git, "https://github.com/plausible/clickhouse_ecto.git", "1969f14ecef7c357b2bd8bdc3e566234269de58c", []},
"clickhousex": {:git, "https://github.com/plausible/clickhousex", "0832dd4b1af1f0eba1d1018c231bf0d8d281f031", []},
"combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"},
"comeonin": {:hex, :comeonin, "5.3.2", "5c2f893d05c56ae3f5e24c1b983c2d5dfb88c6d979c9287a76a7feb1e1d8d646", [:mix], [], "hexpm", "d0993402844c49539aeadb3fe46a3c9bd190f1ecf86b6f9ebd71957534c95f04"},
--
2.31.1

View File

@ -1,21 +0,0 @@
diff --git a/config/runtime.exs b/config/runtime.exs
index 7c9cc14..8facd05 100644
--- a/config/runtime.exs
+++ b/config/runtime.exs
@@ -15,9 +15,7 @@ end
base_url = URI.parse(base_url)
if base_url.scheme not in ["http", "https"] do
- raise "BASE_URL must start with `http` or `https`. Currently configured as `#{
- System.get_env("BASE_URL")
- }`"
+ raise "BASE_URL must start with `http` or `https`. Currently configured as `#{System.get_env("BASE_URL")}`"
end
secret_key_base =
@@ -300,3 +298,5 @@ if appsignal_api_key do
env: env,
active: true
end
+
+config :tzdata, :data_dir, System.get_env("TZDATA_DIR", "priv")

View File

@ -6,9 +6,6 @@
#
# * Add correct `name`/`version` field to `package.json`, otherwise `yarn2nix` fails to
# find required dependencies.
# * Keep `tailwindcss` on version 2.0.1-compat (on `yarn` it will be upgraded due to the `^`).
# This is needed to make sure the entire build still works with `postcss-7` (needed
# by plausible).
# * Adjust `file:`-dependencies a bit for the structure inside a Nix build.
# * Update hashes for the tarball & the fixed-output drv with all `mix`-dependencies.
# * Generate `yarn.lock` & `yarn.nix` in a temporary directory.
@ -29,10 +26,9 @@ fi
SRC="https://raw.githubusercontent.com/plausible/analytics/${latest}"
package_json="$(curl -qf "$SRC/assets/package.json")"
export fixed_tailwind_version="$(jq '.dependencies.tailwindcss' -r <<< "$package_json" | sed -e 's,^^,,g')"
echo "$package_json" \
| jq '. + {"name":"plausible","version": $ENV.latest} | .dependencies.tailwindcss = $ENV.fixed_tailwind_version' \
| jq '. + {"name":"plausible","version": $ENV.latest}' \
| sed -e 's,../deps/,../../tmp/deps/,g' \
> $dir/package.json
@ -58,7 +54,6 @@ cp -r "$(nix-build -A plausible.mixFodDeps)" "$tmp_setup_dir/deps"
chmod -R u+rwx "$tmp_setup_dir"
pushd $tmp_setup_dir/assets
jq < package.json '.dependencies.tailwindcss = "'"$fixed_tailwind_version"'"' | sponge package.json
yarn
yarn2nix > "$dir/yarn.nix"
cp yarn.lock "$dir/yarn.lock"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -27369,6 +27369,8 @@ with pkgs;
pika-backup = callPackage ../applications/backup/pika-backup { };
pur = callPackage ../development/tools/pur { };
purple-discord = callPackage ../applications/networking/instant-messengers/pidgin-plugins/purple-discord { };
purple-hangouts = callPackage ../applications/networking/instant-messengers/pidgin-plugins/purple-hangouts { };

View File

@ -66,6 +66,7 @@ mapAliases ({
privacyidea = throw "privacyidea has been renamed to pkgs.privacyidea"; # added 2021-06-20
prometheus_client = prometheus-client; # added 2021-06-10
prompt_toolkit = prompt-toolkit; # added 2021-07-22
pur = throw "pur has been renamed to pkgs.pur"; # added 2021-11-08
pylibgen = throw "pylibgen is unmaintained upstreamed, and removed from nixpkgs"; # added 2020-06-20
pymssql = throw "pymssql has been abandoned upstream."; # added 2020-05-04
pysmart-smartx = pysmart; # added 2021-10-22

View File

@ -6039,8 +6039,6 @@ in {
pulsectl = callPackage ../development/python-modules/pulsectl { };
pur = callPackage ../development/python-modules/pur { };
pure-cdb = callPackage ../development/python-modules/pure-cdb { };
pure-eval = callPackage ../development/python-modules/pure-eval { };