Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 12, 2023
2 parents ddce1eb + 79f291c commit 0110755
Show file tree
Hide file tree
Showing 59 changed files with 465 additions and 191 deletions.
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
./programs/darling.nix
./programs/dconf.nix
./programs/digitalbitbox/default.nix
./programs/direnv.nix
./programs/dmrconfig.nix
./programs/droidcam.nix
./programs/environment.nix
Expand Down
147 changes: 147 additions & 0 deletions nixos/modules/programs/direnv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.programs.direnv;
in {
options.programs.direnv = {

enable = lib.mkEnableOption (lib.mdDoc ''
direnv integration. Takes care of both installation and
setting up the sourcing of the shell. Additionally enables nix-direnv
integration. Note that you need to logout and login for this change to apply.
'');

package = lib.mkPackageOptionMD pkgs "direnv" {};

direnvrcExtra = lib.mkOption {
type = lib.types.lines;
default = "";
example = ''
export FOO="foo"
echo "loaded direnv!"
'';
description = lib.mdDoc ''
Extra lines to append to the sourced direnvrc
'';
};

silent = lib.mkEnableOption (lib.mdDoc ''
the hiding of direnv logging
'');

persistDerivations =
(lib.mkEnableOption (lib.mdDoc ''
setting keep-derivations and keep-outputs to true
to prevent shells from getting garbage collected
''))
// {
default = true;
};

loadInNixShell =
lib.mkEnableOption (lib.mdDoc ''
loading direnv in `nix-shell` `nix shell` or `nix develop`
'')
// {
default = true;
};

nix-direnv = {
enable =
(lib.mkEnableOption (lib.mdDoc ''
a faster, persistent implementation of use_nix and use_flake, to replace the built-in one
''))
// {
default = true;
};

package = lib.mkPackageOptionMD pkgs "nix-direnv" {};
};
};

config = lib.mkIf cfg.enable {

programs = {
zsh.interactiveShellInit = ''
if ${lib.boolToString cfg.loadInNixShell} || printenv PATH | grep -vqc '/nix/store'; then
eval "$(${lib.getExe cfg.package} hook zsh)"
fi
'';

#$NIX_GCROOT for "nix develop" https://github.com/NixOS/nix/blob/6db66ebfc55769edd0c6bc70fcbd76246d4d26e0/src/nix/develop.cc#L530
#$IN_NIX_SHELL for "nix-shell"
bash.interactiveShellInit = ''
if ${lib.boolToString cfg.loadInNixShell} || [ -z "$IN_NIX_SHELL$NIX_GCROOT$(printenv PATH | grep '/nix/store')" ] ; then
eval "$(${lib.getExe cfg.package} hook bash)"
fi
'';

fish.interactiveShellInit = ''
if ${lib.boolToString cfg.loadInNixShell};
or printenv PATH | grep -vqc '/nix/store';
${lib.getExe cfg.package} hook fish | source
end
'';
};

nix.settings = lib.mkIf cfg.persistDerivations {
keep-outputs = true;
keep-derivations = true;
};

environment = {
systemPackages =
if cfg.loadInNixShell then [cfg.package]
else [
#direnv has a fish library which sources direnv for some reason
(cfg.package.overrideAttrs (old: {
installPhase =
(old.installPhase or "")
+ ''
rm -rf $out/share/fish
'';
}))
];

variables = {
DIRENV_CONFIG = "/etc/direnv";
DIRENV_LOG_FORMAT = lib.mkIf cfg.silent "";
};

etc = {
"direnv/direnvrc".text = ''
${lib.optionalString cfg.nix-direnv.enable ''
#Load nix-direnv
source ${cfg.nix-direnv.package}/share/nix-direnv/direnvrc
''}
#Load direnvrcExtra
${cfg.direnvrcExtra}
#Load user-configuration if present (~/.direnvrc or ~/.config/direnv/direnvrc)
direnv_config_dir_home="''${DIRENV_CONFIG_HOME:-''${XDG_CONFIG_HOME:-$HOME/.config}/direnv}"
if [[ -f $direnv_config_dir_home/direnvrc ]]; then
source "$direnv_config_dir_home/direnvrc" >&2
elif [[ -f $HOME/.direnvrc ]]; then
source "$HOME/.direnvrc" >&2
fi
unset direnv_config_dir_home
'';

"direnv/lib/zz-user.sh".text = ''
direnv_config_dir_home="''${DIRENV_CONFIG_HOME:-''${XDG_CONFIG_HOME:-$HOME/.config}/direnv}"
for lib in "$direnv_config_dir_home/lib/"*.sh; do
source "$lib"
done
unset direnv_config_dir_home
'';
};
};
};
}
3 changes: 2 additions & 1 deletion nixos/modules/services/misc/nitter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ in
systemd.services.nitter = {
description = "Nitter (An alternative Twitter front-end)";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
serviceConfig = {
DynamicUser = true;
StateDirectory = "nitter";
Expand Down
5 changes: 3 additions & 2 deletions nixos/modules/services/security/usbguard.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let
daemonConf = ''
# generated by nixos/modules/services/security/usbguard.nix
RuleFile=${ruleFile}
ImplicitPolicyTarget=${cfg.implictPolicyTarget}
ImplicitPolicyTarget=${cfg.implicitPolicyTarget}
PresentDevicePolicy=${cfg.presentDevicePolicy}
PresentControllerPolicy=${cfg.presentControllerPolicy}
InsertedDevicePolicy=${cfg.insertedDevicePolicy}
Expand Down Expand Up @@ -73,7 +73,7 @@ in
'';
};

implictPolicyTarget = mkOption {
implicitPolicyTarget = mkOption {
type = policy;
default = "block";
description = lib.mdDoc ''
Expand Down Expand Up @@ -251,5 +251,6 @@ in
(mkRemovedOptionModule [ "services" "usbguard" "ruleFile" ] "The usbguard module now uses ${defaultRuleFile} as ruleFile. Alternatively, use services.usbguard.rules to configure rules.")
(mkRemovedOptionModule [ "services" "usbguard" "IPCAccessControlFiles" ] "The usbguard module now hardcodes IPCAccessControlFiles to /var/lib/usbguard/IPCAccessControl.d.")
(mkRemovedOptionModule [ "services" "usbguard" "auditFilePath" ] "Removed usbguard module audit log files. Audit logs can be found in the systemd journal.")
(mkRenamedOptionModule [ "services" "usbguard" "implictPolicyTarget" ] [ "services" "usbguard" "implicitPolicyTarget" ])
];
}
8 changes: 6 additions & 2 deletions pkgs/applications/audio/mympd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ stdenv.mkDerivation rec {
# similarly here
"-DCMAKE_INSTALL_LOCALSTATEDIR=/var/lib/mympd"
];
# See https://github.com/jcorporation/myMPD/issues/315
hardeningDisable = [ "strictoverflow" ];
hardeningDisable = [
# See https://github.com/jcorporation/myMPD/issues/315
"strictoverflow"
# causes redefinition of _FORTIFY_SOURCE
"fortify3"
];

meta = {
homepage = "https://jcorporation.github.io/myMPD";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/open-stage-control/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

buildNpmPackage rec {
pname = "open-stage-control";
version = "1.25.1";
version = "1.25.2";

src = fetchFromGitHub {
owner = "jean-emmanuel";
repo = "open-stage-control";
rev = "v${version}";
hash = "sha256-mbd+fknSzokFt5dPlZrZIpDox/NzMbvyFp2fNPelv3c=";
hash = "sha256-7D3C1W2Y7FJnLxbXKXFFPDf+EXhLgPEj0APc2ZFYUlM=";
};

# Remove some Electron stuff from package.json
Expand Down
8 changes: 7 additions & 1 deletion pkgs/applications/editors/jetbrains/update_ides.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
import pathlib
import logging
import requests
import subprocess
import sys
import xmltodict
from packaging import version

updates_url = "https://www.jetbrains.com/updates/updates.xml"
versions_file_path = pathlib.Path(__file__).parent.joinpath("versions.json").resolve()
current_path = pathlib.Path(__file__).parent
versions_file_path = current_path.joinpath("versions.json").resolve()

logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)

Expand Down Expand Up @@ -98,3 +100,7 @@ def update_products(products):
with open(versions_file_path, "w") as versions_file:
json.dump(versions, versions_file, indent=2)
versions_file.write("\n")

logging.info("#### Updating plugins ####")
plugin_script = current_path.joinpath("plugins/update_plugins.py").resolve()
subprocess.call(plugin_script)
1 change: 1 addition & 0 deletions pkgs/applications/emulators/duckstation/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ stdenv.mkDerivation {
homepage = "https://github.com/stenzek/duckstation";
description = "Fast PlayStation 1 emulator for x86-64/AArch32/AArch64";
license = licenses.gpl3Only;
mainProgram = "duckstation-qt";
maintainers = with maintainers; [ guibou AndersonTorres ];
platforms = platforms.linux;
};
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/klayout/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

mkDerivation rec {
pname = "klayout";
version = "0.28.9-2";
version = "0.28.10";

src = fetchFromGitHub {
owner = "KLayout";
repo = "klayout";
rev = "v${version}";
hash = "sha256-yBBzJceYHuqYhYvZHpL22uFsOz1TKZFwdzuUQOC4wQw=";
hash = "sha256-CDaLKBDm4slUMZ8OWm/wNub4P8LY26P8G8oIxwzJyXY=";
};

postPatch = ''
Expand Down
6 changes: 2 additions & 4 deletions pkgs/applications/misc/upwork/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

stdenv.mkDerivation rec {
pname = "upwork";
version = "5.8.0.24";
version = "5.8.0.31";

src = requireFile {
name = "${pname}_${version}_amd64.deb";
url = "https://www.upwork.com/ab/downloads/os/linux/";
sha256 = "sha256-9X1U/ImI8GfCiYLpLD+jICYAYsAr1NJLlOMvecXK7hc=";
sha256 = "sha256-tQV6v0U6xxqBl7nQaBhXSrc9iv+7SPHfABTiJJQDnPI=";
};

nativeBuildInputs = [
Expand All @@ -31,8 +31,6 @@ stdenv.mkDerivation rec {
libPath = lib.makeLibraryPath buildInputs;

dontWrapGApps = true;
dontBuild = true;
dontConfigure = true;

unpackPhase = ''
dpkg-deb -x ${src} ./
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/cluster/kluctl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

buildGoModule rec {
pname = "kluctl";
version = "2.20.7";
version = "2.20.8";

src = fetchFromGitHub {
owner = "kluctl";
repo = "kluctl";
rev = "v${version}";
hash = "sha256-NcvPo+6f2EYhitzOl2VPz8MtFIsYBuOA7EJnD4TJdmI=";
hash = "sha256-F4vEHzN44+d0EtfJukEq5WVm8aLVWqmT5Xcpa/DBPng=";
};

vendorHash = "sha256-x5Zy8H7DzxU+uBCUL6edv8x2LwiIjXl5UrRUMDtUEk8=";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ stdenv.mkDerivation {
# qt.conf is not working, so override everything using environment variables
wrapProgram $out/opt/viber/Viber \
--set QT_QPA_PLATFORM "xcb" \
--set QT_PLUGIN_PATH "$out/opt/viber/plugins" \
--set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \
--set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale" \
Expand Down
3 changes: 3 additions & 0 deletions pkgs/applications/networking/nextcloud-client/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ mkDerivation rec {
"-DNO_SHIBBOLETH=1" # allows to compile without qtwebkit
];

# causes redefinition of _FORTIFY_SOURCE
hardeningDisable = [ "fortify3" ];

postBuild = ''
make doc-man
'';
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/networking/p2p/rqbit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

rustPlatform.buildRustPackage rec {
pname = "rqbit";
version = "2.2.0";
version = "2.2.1";

src = fetchFromGitHub {
owner = "ikatson";
repo = "rqbit";
rev = "v${version}";
hash = "sha256-RF/3eICbqYXSuOWTvRBImiLPWIh4Oip37S5gqoSmDzE=";
hash = "sha256-7n+T+y60RjmZC7bE96Ljg0xVg4bSzV/LFgezTld4zfI=";
};

cargoHash = "sha256-wawlqnPYCLEkR9XpTQRZqG+wsqN/Nd5Q1IXpE6ikmY4=";
cargoHash = "sha256-hcuZ4hqGJT/O7vFefKPGZlkqhdsAl5LGAcSRQAEopnM=";

nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];

Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/office/libreoffice/darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
let
appName = "LibreOffice.app";
scriptName = "soffice";
version = "7.4.3";
version = "7.4.7";

dist = {
aarch64-darwin = rec {
arch = "aarch64";
archSuffix = arch;
url = "https://download.documentfoundation.org/libreoffice/stable/${version}/mac/${arch}/LibreOffice_${version}_MacOS_${archSuffix}.dmg";
sha256 = "cf95f9ecd4451d27e8304cea3ba116675267bdf75f08fbb60e0d8917f86edc04";
sha256 = "d02513c6a58f35cb0da6880f76be3f4b3a620daaa9ce5c244d6efc40ed26a273";
};

x86_64-darwin = rec {
arch = "x86_64";
archSuffix = "x86-64";
url = "https://download.documentfoundation.org/libreoffice/stable/${version}/mac/${arch}/LibreOffice_${version}_MacOS_${archSuffix}.dmg";
sha256 = "fe569ba23bb74eb3e86974537dd80e504debe5fd8526a00edbad6be4da18986a";
sha256 = "c8ae0cbaa043b30718a4ac0ca93369e887fe6a46bb3618cea054bffaafd8b8e2";
};
};
in
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/office/qpdfview/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ mkDerivation rec {
"APPDATA_INSTALL_PATH=${placeholder "out"}/share/appdata"
];

env = {
# Fix build due to missing `std::option`.
NIX_CFLAGS_COMPILE = "-std=c++17";
};

meta = with lib; {
description = "A tabbed document viewer";
license = licenses.gpl2Plus;
Expand Down
3 changes: 3 additions & 0 deletions pkgs/applications/science/misc/root/5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ stdenv.mkDerivation rec {
})
];

# https://github.com/root-project/root/issues/13216
hardeningDisable = [ "fortify3" ];

preConfigure = ''
# binutils 2.37 fixes
fixupList=(
Expand Down
Loading

0 comments on commit 0110755

Please sign in to comment.