Merge staging-next into staging

Changed files
+264 -66
nixos
doc
manual
release-notes
modules
services
tests
pkgs
applications
editors
networking
cluster
kubelogin-oidc
build-support
build-fhs-userenv-bubblewrap
data
icons
tela-icon-theme
development
libraries
python-modules
tools
graphics
pngquant
top-level
+1 -1
nixos/doc/manual/release-notes/rl-2105.xml
···
</listitem>
<listitem>
<para>
-
<literal>vim</literal> switched to Python 3, dropping all Python 2 support.
</para>
</listitem>
<listitem>
···
</listitem>
<listitem>
<para>
+
<literal>vim</literal> and <literal>neovim</literal> switched to Python 3, dropping all Python 2 support.
</para>
</listitem>
<listitem>
+69 -7
nixos/modules/services/misc/home-assistant.nix
···
rm -f "${cfg.configDir}/ui-lovelace.yaml"
ln -s ${lovelaceConfigFile} "${cfg.configDir}/ui-lovelace.yaml"
'');
-
serviceConfig = {
-
ExecStart = "${package}/bin/hass --config '${cfg.configDir}'";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
User = "hass";
Group = "hass";
Restart = "on-failure";
ProtectSystem = "strict";
ReadWritePaths = let
cfgPath = [ "config" "homeassistant" "allowlist_external_dirs" ];
value = attrByPath cfgPath [] cfg;
allowPaths = if isList value then value else singleton value;
in [ "${cfg.configDir}" ] ++ allowPaths;
-
KillSignal = "SIGINT";
-
PrivateTmp = true;
-
RemoveIPC = true;
-
AmbientCapabilities = "cap_net_raw,cap_net_admin+eip";
};
path = [
"/run/wrappers" # needed for ping
···
home = cfg.configDir;
createHome = true;
group = "hass";
-
extraGroups = [ "dialout" ];
uid = config.ids.uids.hass;
};
···
rm -f "${cfg.configDir}/ui-lovelace.yaml"
ln -s ${lovelaceConfigFile} "${cfg.configDir}/ui-lovelace.yaml"
'');
+
serviceConfig = let
+
# List of capabilities to equip home-assistant with, depending on configured components
+
capabilities = [
+
# Empty string first, so we will never accidentally have an empty capability bounding set
+
# https://github.com/NixOS/nixpkgs/issues/120617#issuecomment-830685115
+
""
+
] ++ (unique (optionals (useComponent "bluetooth_tracker" || useComponent "bluetooth_le_tracker") [
+
# Required for interaction with hci devices and bluetooth sockets
+
# https://www.home-assistant.io/integrations/bluetooth_le_tracker/#rootless-setup-on-core-installs
+
"CAP_NET_ADMIN"
+
"CAP_NET_RAW"
+
] ++ lib.optionals (useComponent "emulated_hue") [
+
# Alexa looks for the service on port 80
+
# https://www.home-assistant.io/integrations/emulated_hue
+
"CAP_NET_BIND_SERVICE"
+
] ++ lib.optionals (useComponent "nmap_tracker") [
+
# https://www.home-assistant.io/integrations/nmap_tracker#linux-capabilities
+
"CAP_NET_ADMIN"
+
"CAP_NET_BIND_SERVICE"
+
"CAP_NET_RAW"
+
]));
+
in {
+
ExecStart = "${package}/bin/hass --runner --config '${cfg.configDir}'";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
User = "hass";
Group = "hass";
Restart = "on-failure";
+
RestartForceExitStatus = "100";
+
SuccessExitStatus = "100";
+
KillSignal = "SIGINT";
+
+
# Hardening
+
AmbientCapabilities = capabilities;
+
CapabilityBoundingSet = capabilities;
+
DeviceAllow = [
+
"char-ttyACM rw"
+
"char-ttyAMA rw"
+
"char-ttyUSB rw"
+
];
+
DevicePolicy = "closed";
+
LockPersonality = true;
+
MemoryDenyWriteExecute = true;
+
NoNewPrivileges = true;
+
PrivateTmp = true;
+
PrivateUsers = false; # prevents gaining capabilities in the host namespace
+
ProtectClock = true;
+
ProtectControlGroups = true;
+
ProtectHome = true;
+
ProtectHostname = true;
+
ProtectKernelLogs = true;
+
ProtectKernelModules = true;
+
ProtectKernelTunables = true;
+
ProtectProc = "invisible";
+
ProcSubset = "pid";
ProtectSystem = "strict";
+
RemoveIPC = true;
ReadWritePaths = let
+
# Allow rw access to explicitly configured paths
cfgPath = [ "config" "homeassistant" "allowlist_external_dirs" ];
value = attrByPath cfgPath [] cfg;
allowPaths = if isList value then value else singleton value;
in [ "${cfg.configDir}" ] ++ allowPaths;
+
RestrictAddressFamilies = [
+
"AF_UNIX"
+
"AF_INET"
+
"AF_INET6"
+
] ++ optionals (useComponent "bluetooth_tracker" || useComponent "bluetooth_le_tracker") [
+
"AF_BLUETOOTH"
+
];
+
RestrictNamespaces = true;
+
RestrictRealtime = true;
+
RestrictSUIDSGID = true;
+
SupplementaryGroups = [ "dialout" ];
+
SystemCallArchitectures = "native";
+
SystemCallFilter = [
+
"@system-service"
+
"~@privileged"
+
];
+
UMask = "0077";
};
path = [
"/run/wrappers" # needed for ping
···
home = cfg.configDir;
createHome = true;
group = "hass";
uid = config.ids.uids.hass;
};
+40 -6
nixos/modules/services/networking/mosquitto.nix
···
acl_file ${aclFile}
persistence true
allow_anonymous ${boolToString cfg.allowAnonymous}
-
bind_address ${cfg.host}
-
port ${toString cfg.port}
${passwordConf}
${listenerConf}
${cfg.extraConf}
···
ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
-
ProtectSystem = "strict";
-
ProtectHome = true;
PrivateDevices = true;
PrivateTmp = true;
-
ReadWritePaths = "${cfg.dataDir}";
ProtectControlGroups = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
-
NoNewPrivileges = true;
};
preStart = ''
rm -f ${cfg.dataDir}/passwd
···
acl_file ${aclFile}
persistence true
allow_anonymous ${boolToString cfg.allowAnonymous}
+
listener ${toString cfg.port} ${cfg.host}
${passwordConf}
${listenerConf}
${cfg.extraConf}
···
ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
+
# Hardening
+
CapabilityBoundingSet = "";
+
DevicePolicy = "closed";
+
LockPersonality = true;
+
MemoryDenyWriteExecute = true;
+
NoNewPrivileges = true;
PrivateDevices = true;
PrivateTmp = true;
+
PrivateUsers = true;
+
ProtectClock = true;
ProtectControlGroups = true;
+
ProtectHome = true;
+
ProtectHostname = true;
+
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
+
ProtectProc = "invisible";
+
ProcSubset = "pid";
+
ProtectSystem = "strict";
+
ReadWritePaths = [
+
cfg.dataDir
+
"/tmp" # mosquitto_passwd creates files in /tmp before moving them
+
];
+
ReadOnlyPaths = with cfg.ssl; lib.optionals (enable) [
+
certfile
+
keyfile
+
cafile
+
];
+
RemoveIPC = true;
+
RestrictAddressFamilies = [
+
"AF_UNIX" # for sd_notify() call
+
"AF_INET"
+
"AF_INET6"
+
];
+
RestrictNamespaces = true;
+
RestrictRealtime = true;
+
RestrictSUIDSGID = true;
+
SystemCallArchitectures = "native";
+
SystemCallFilter = [
+
"@system-service"
+
"~@privileged"
+
"~@resources"
+
];
+
UMask = "0077";
};
preStart = ''
rm -f ${cfg.dataDir}/passwd
+12 -4
nixos/tests/home-assistant.nix
···
-
import ./make-test-python.nix ({ pkgs, ... }:
let
configDir = "/var/lib/foobar";
···
mqttPassword = "secret";
in {
name = "home-assistant";
-
meta = with pkgs.lib; {
-
maintainers = with maintainers; [ dotlambda ];
-
};
nodes.hass = { pkgs, ... }: {
environment.systemPackages = with pkgs; [ mosquitto ];
···
payload_on = "let_there_be_light";
payload_off = "off";
}];
logger = {
default = "info";
logs."homeassistant.components.mqtt" = "debug";
···
hass.succeed(
"mosquitto_pub -V mqttv5 -t home-assistant/test -u ${mqttUsername} -P '${mqttPassword}' -m let_there_be_light"
)
with subtest("Print log to ease debugging"):
output_log = hass.succeed("cat ${configDir}/home-assistant.log")
print("\n### home-assistant.log ###\n")
···
# example line: 2020-06-20 10:01:32 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on home-assistant/test: b'let_there_be_light'
with subtest("Check we received the mosquitto message"):
assert "let_there_be_light" in output_log
'';
})
···
+
import ./make-test-python.nix ({ pkgs, lib, ... }:
let
configDir = "/var/lib/foobar";
···
mqttPassword = "secret";
in {
name = "home-assistant";
+
meta.maintainers = lib.teams.home-assistant.members;
nodes.hass = { pkgs, ... }: {
environment.systemPackages = with pkgs; [ mosquitto ];
···
payload_on = "let_there_be_light";
payload_off = "off";
}];
+
emulated_hue = {
+
host_ip = "127.0.0.1";
+
listen_port = 80;
+
};
logger = {
default = "info";
logs."homeassistant.components.mqtt" = "debug";
···
hass.succeed(
"mosquitto_pub -V mqttv5 -t home-assistant/test -u ${mqttUsername} -P '${mqttPassword}' -m let_there_be_light"
)
+
with subtest("Check that capabilities are passed for emulated_hue to bind to port 80"):
+
hass.wait_for_open_port(80)
+
hass.succeed("curl --fail http://localhost:80/description.xml")
with subtest("Print log to ease debugging"):
output_log = hass.succeed("cat ${configDir}/home-assistant.log")
print("\n### home-assistant.log ###\n")
···
# example line: 2020-06-20 10:01:32 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on home-assistant/test: b'let_there_be_light'
with subtest("Check we received the mosquitto message"):
assert "let_there_be_light" in output_log
+
+
with subtest("Check systemd unit hardening"):
+
hass.log(hass.succeed("systemd-analyze security home-assistant.service"))
'';
})
+4 -1
nixos/tests/mosquitto.nix
···
-
import ./make-test-python.nix ({ pkgs, ... }:
let
port = 1888;
···
];
};
};
};
client1 = client;
···
+
import ./make-test-python.nix ({ pkgs, lib, ... }:
let
port = 1888;
···
];
};
};
+
+
# disable private /tmp for this test
+
systemd.services.mosquitto.serviceConfig.PrivateTmp = lib.mkForce false;
};
client1 = client;
+2 -2
pkgs/applications/editors/neovim/default.nix
···
# now defaults to false because some tests can be flaky (clipboard etc)
, doCheck ? false
-
, nodejs ? null, fish ? null, python ? null
}:
with lib;
···
]
));
-
pyEnv = python.withPackages(ps: [ ps.pynvim ps.msgpack ]);
# FIXME: this is verry messy and strange.
# see https://github.com/NixOS/nixpkgs/pull/80528
···
# now defaults to false because some tests can be flaky (clipboard etc)
, doCheck ? false
+
, nodejs ? null, fish ? null, python3 ? null
}:
with lib;
···
]
));
+
pyEnv = python3.withPackages(ps: with ps; [ pynvim msgpack ]);
# FIXME: this is verry messy and strange.
# see https://github.com/NixOS/nixpkgs/pull/80528
+2 -2
pkgs/applications/editors/neovim/neovim-qt.nix
···
{ lib, mkDerivation, fetchFromGitHub, cmake, doxygen, makeWrapper
-
, msgpack, neovim, pythonPackages, qtbase }:
mkDerivation rec {
pname = "neovim-qt-unwrapped";
···
buildInputs = [
neovim.unwrapped # only used to generate help tags at build time
qtbase
-
] ++ (with pythonPackages; [
jinja2 python msgpack
]);
···
{ lib, mkDerivation, fetchFromGitHub, cmake, doxygen, makeWrapper
+
, msgpack, neovim, python3Packages, qtbase }:
mkDerivation rec {
pname = "neovim-qt-unwrapped";
···
buildInputs = [
neovim.unwrapped # only used to generate help tags at build time
qtbase
+
] ++ (with python3Packages; [
jinja2 python msgpack
]);
+19 -4
pkgs/applications/editors/neovim/neovim-remote.nix
···
-
{ lib, fetchFromGitHub, pythonPackages }:
with lib;
-
pythonPackages.buildPythonApplication rec {
pname = "neovim-remote";
version = "2.4.0";
-
disabled = !pythonPackages.isPy3k;
src = fetchFromGitHub {
owner = "mhinz";
···
sha256 = "0jlw0qksak4bdzddpsj74pm2f2bgpj3cwrlspdjjy0j9qzg0mpl9";
};
-
propagatedBuildInputs = with pythonPackages; [
pynvim
psutil
setuptools
];
meta = {
···
+
{ lib
+
, fetchFromGitHub
+
, python3
+
, neovim
+
}:
with lib;
+
with python3.pkgs; buildPythonApplication rec {
pname = "neovim-remote";
version = "2.4.0";
src = fetchFromGitHub {
owner = "mhinz";
···
sha256 = "0jlw0qksak4bdzddpsj74pm2f2bgpj3cwrlspdjjy0j9qzg0mpl9";
};
+
propagatedBuildInputs = [
pynvim
psutil
setuptools
+
];
+
+
checkInputs = [
+
neovim
+
pytestCheckHook
+
];
+
+
disabledTests = [
+
# these tests get stuck and never return
+
"test_escape_filenames_properly"
+
"test_escape_single_quotes_in_filenames"
+
"test_escape_double_quotes_in_filenames"
];
meta = {
+1 -2
pkgs/applications/editors/neovim/qt.nix
···
-
{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake, doxygen, makeWrapper
-
, msgpack, neovim, pythonPackages, qtbase, neovim-qt-unwrapped }:
let
unwrapped = neovim-qt-unwrapped;
···
+
{ stdenv, makeWrapper, neovim, neovim-qt-unwrapped }:
let
unwrapped = neovim-qt-unwrapped;
+5 -12
pkgs/applications/editors/neovim/utils.nix
···
, neovim-unwrapped
, bundlerEnv
, ruby
-
, pythonPackages
, python3Packages
, writeText
, wrapNeovimUnstable
···
requiredPlugins = vimUtils.requiredPlugins configure;
getDeps = attrname: map (plugin: plugin.${attrname} or (_: [ ]));
-
pluginPython2Packages = getDeps "pythonDependencies" requiredPlugins;
-
python2Env = pythonPackages.python.withPackages (ps:
-
[ ps.pynvim ]
-
++ (extraPython2Packages ps)
-
++ (lib.concatMap (f: f ps) pluginPython2Packages));
-
pluginPython3Packages = getDeps "python3Dependencies" requiredPlugins;
python3Env = python3Packages.python.withPackages (ps:
[ ps.pynvim ]
···
# While the latter tells nvim that this provider is not available
hostprog_check_table = {
node = withNodeJs;
-
python = withPython2;
python3 = withPython3;
ruby = withRuby;
};
···
manifestRc = vimUtils.vimrcContent (configure // { customRC = ""; });
neovimRcContent = vimUtils.vimrcContent configure;
in
args // {
wrapperArgs = makeWrapperArgs;
inherit neovimRcContent;
inherit manifestRc;
-
inherit python2Env;
inherit python3Env;
inherit withNodeJs;
} // lib.optionalAttrs withRuby {
···
# to keep backwards compatibility
legacyWrapper = neovim: {
extraMakeWrapperArgs ? ""
-
, withPython ? true
/* the function you would have passed to python.withPackages */
, extraPythonPackages ? (_: [])
/* the function you would have passed to python.withPackages */
···
else funOrList);
res = makeNeovimConfig {
-
withPython2 = withPython;
-
extraPythonPackages = compatFun extraPythonPackages;
inherit withPython3;
extraPython3Packages = compatFun extraPython3Packages;
inherit withNodeJs withRuby viAlias vimAlias;
inherit configure;
};
in
wrapNeovimUnstable neovim (res // {
wrapperArgs = lib.escapeShellArgs (
res.wrapperArgs ++ lib.optionals (configure != {}) [
···
, neovim-unwrapped
, bundlerEnv
, ruby
, python3Packages
, writeText
, wrapNeovimUnstable
···
requiredPlugins = vimUtils.requiredPlugins configure;
getDeps = attrname: map (plugin: plugin.${attrname} or (_: [ ]));
pluginPython3Packages = getDeps "python3Dependencies" requiredPlugins;
python3Env = python3Packages.python.withPackages (ps:
[ ps.pynvim ]
···
# While the latter tells nvim that this provider is not available
hostprog_check_table = {
node = withNodeJs;
python3 = withPython3;
ruby = withRuby;
};
···
manifestRc = vimUtils.vimrcContent (configure // { customRC = ""; });
neovimRcContent = vimUtils.vimrcContent configure;
in
+
assert withPython2 -> throw "Python2 support has been removed from neovim, please remove withPython2 and extraPython2Packages.";
+
args // {
wrapperArgs = makeWrapperArgs;
inherit neovimRcContent;
inherit manifestRc;
inherit python3Env;
inherit withNodeJs;
} // lib.optionalAttrs withRuby {
···
# to keep backwards compatibility
legacyWrapper = neovim: {
extraMakeWrapperArgs ? ""
+
, withPython ? false
/* the function you would have passed to python.withPackages */
, extraPythonPackages ? (_: [])
/* the function you would have passed to python.withPackages */
···
else funOrList);
res = makeNeovimConfig {
inherit withPython3;
extraPython3Packages = compatFun extraPython3Packages;
inherit withNodeJs withRuby viAlias vimAlias;
inherit configure;
};
in
+
assert withPython -> throw "Python2 support has been removed from neovim, please remove withPython and extraPythonPackages.";
+
wrapNeovimUnstable neovim (res // {
wrapperArgs = lib.escapeShellArgs (
res.wrapperArgs ++ lib.optionals (configure != {}) [
+3 -5
pkgs/applications/editors/neovim/wrapper.nix
···
, bundlerEnv, ruby
, nodejs
, nodePackages
-
, pythonPackages
, python3Packages
}:
with lib;
···
# should contain all args but the binary
wrapperArgs ? ""
, manifestRc ? null
-
, withPython2 ? true, python2Env ? null
, withPython3 ? true, python3Env ? null
, withNodeJs ? false
, rubyEnv ? null
···
[ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim" ] ++
[ "--set" "NVIM_SYSTEM_RPLUGIN_MANIFEST" "${placeholder "out"}/rplugin.vim" ];
in
symlinkJoin {
name = "neovim-${lib.getVersion neovim}";
# Remove the symlinks created by symlinkJoin which we need to perform
···
rm $out/share/applications/nvim.desktop
substitute ${neovim}/share/applications/nvim.desktop $out/share/applications/nvim.desktop \
--replace 'Name=Neovim' 'Name=WrappedNeovim'
-
''
-
+ optionalString withPython2 ''
-
makeWrapper ${python2Env}/bin/python $out/bin/nvim-python --unset PYTHONPATH
''
+ optionalString withPython3 ''
makeWrapper ${python3Env}/bin/python3 $out/bin/nvim-python3 --unset PYTHONPATH
···
, bundlerEnv, ruby
, nodejs
, nodePackages
, python3Packages
}:
with lib;
···
# should contain all args but the binary
wrapperArgs ? ""
, manifestRc ? null
+
, withPython2 ? false
, withPython3 ? true, python3Env ? null
, withNodeJs ? false
, rubyEnv ? null
···
[ "${neovim}/bin/nvim" "${placeholder "out"}/bin/nvim" ] ++
[ "--set" "NVIM_SYSTEM_RPLUGIN_MANIFEST" "${placeholder "out"}/rplugin.vim" ];
in
+
assert withPython2 -> throw "Python2 support has been removed from the neovim wrapper, please remove withPython2 and python2Env.";
+
symlinkJoin {
name = "neovim-${lib.getVersion neovim}";
# Remove the symlinks created by symlinkJoin which we need to perform
···
rm $out/share/applications/nvim.desktop
substitute ${neovim}/share/applications/nvim.desktop $out/share/applications/nvim.desktop \
--replace 'Name=Neovim' 'Name=WrappedNeovim'
''
+ optionalString withPython3 ''
makeWrapper ${python3Env}/bin/python3 $out/bin/nvim-python3 --unset PYTHONPATH
+66 -4
pkgs/applications/editors/vscode/generic.nix
···
{ stdenv, lib, makeDesktopItem
, unzip, libsecret, libXScrnSaver, libxshmfence, wrapGAppsHook
, gtk2, atomEnv, at-spi2-atk, autoPatchelfHook
-
, systemd, fontconfig, libdbusmenu
# Populate passthru.tests
, tests
···
let
inherit (stdenv.hostPlatform) system;
-
in
-
stdenv.mkDerivation {
inherit pname version src sourceRoot;
passthru = {
inherit executableName tests;
};
desktopItem = makeDesktopItem {
···
'';
inherit meta;
-
}
···
{ stdenv, lib, makeDesktopItem
, unzip, libsecret, libXScrnSaver, libxshmfence, wrapGAppsHook
, gtk2, atomEnv, at-spi2-atk, autoPatchelfHook
+
, systemd, fontconfig, libdbusmenu, buildFHSUserEnvBubblewrap
+
, writeShellScriptBin
# Populate passthru.tests
, tests
···
let
inherit (stdenv.hostPlatform) system;
+
unwrapped = stdenv.mkDerivation {
inherit pname version src sourceRoot;
passthru = {
inherit executableName tests;
+
fhs = fhs {};
+
fhsWithPackages = f: fhs { additionalPkgs = f; };
};
desktopItem = makeDesktopItem {
···
'';
inherit meta;
+
};
+
+
# Vscode and variants allow for users to download and use extensions
+
# which often include the usage of pre-built binaries.
+
# This has been an on-going painpoint for many users, as
+
# a full extension update cycle has to be done through nixpkgs
+
# in order to create or update extensions.
+
# See: #83288 #91179 #73810 #41189
+
#
+
# buildFHSUserEnv allows for users to use the existing vscode
+
# extension tooling without significant pain.
+
fhs = { additionalPkgs ? pkgs: [] }: buildFHSUserEnvBubblewrap {
+
# also determines the name of the wrapped command
+
name = executableName;
+
+
# additional libraries which are commonly needed for extensions
+
targetPkgs = pkgs: (with pkgs; [
+
# ld-linux-x86-64-linux.so.2 and others
+
glibc
+
+
# dotnet
+
curl
+
icu
+
libunwind
+
libuuid
+
openssl
+
zlib
+
+
# mono
+
krb5
+
]) ++ additionalPkgs pkgs;
+
+
# restore desktop item icons
+
extraInstallCommands = ''
+
mkdir -p $out/share/applications
+
for item in ${unwrapped}/share/applications/*.desktop; do
+
ln -s $item $out/share/applications/
+
done
+
'';
+
+
runScript = "${unwrapped}/bin/${executableName}";
+
+
# vscode likes to kill the parent so that the
+
# gui application isn't attached to the terminal session
+
dieWithParent = false;
+
+
passthru = {
+
inherit executableName;
+
inherit (unwrapped) pname version; # for home-manager module
+
};
+
+
meta = meta // {
+
description = ''
+
Wrapped variant of ${pname} which launches in a FHS compatible envrionment.
+
Should allow for easy usage of extensions without nix-specific modifications.
+
'';
+
};
+
};
+
in
+
unwrapped
+
+3 -3
pkgs/applications/networking/cluster/kubelogin-oidc/default.nix
···
buildGoModule rec {
pname = "kubelogin";
-
version = "1.23.0";
src = fetchFromGitHub {
owner = "int128";
repo = pname;
rev = "v${version}";
-
sha256 = "0n94nx17c6ln2nd6d9yr93vc251y1xphq1wj2vzs4j2l8dqfyjpn";
};
subPackages = ["."];
-
vendorSha256 = "1dvrk6z6k66wawgb50n8hbgdd8fly399mlbgnvxi671vfi7lkz09";
# Rename the binary instead of symlinking to avoid conflict with the
# Azure version of kubelogin
···
buildGoModule rec {
pname = "kubelogin";
+
version = "1.23.1";
src = fetchFromGitHub {
owner = "int128";
repo = pname;
rev = "v${version}";
+
sha256 = "sha256-YK/QGx6QzSeyeZ61KgdYO3POJQFK1F6yJayd2gcRWS4=";
};
subPackages = ["."];
+
vendorSha256 = "sha256-tnjgs8Ziqdo1ciVOWtL0D8puv2SZGqSHgo2SV7N8F0M=";
# Rename the binary instead of symlinking to avoid conflict with the
# Azure version of kubelogin
+10 -2
pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix
···
, unshareNet ? false
, unshareUts ? true
, unshareCgroup ? true
, ...
}:
···
buildFHSEnv = callPackage ./env.nix { };
env = buildFHSEnv (removeAttrs args [
-
"runScript" "extraInstallCommands" "meta" "passthru"
"unshareUser" "unshareCgroup" "unshareUts" "unshareNet" "unsharePid" "unshareIpc"
]);
···
files = [
# NixOS Compatibility
"static"
# Users, Groups, NSS
"passwd"
"group"
···
${lib.optionalString unshareNet "--unshare-net"}
${lib.optionalString unshareUts "--unshare-uts"}
${lib.optionalString unshareCgroup "--unshare-cgroup"}
-
--die-with-parent
--ro-bind /nix /nix
# Our glibc will look for the cache in its own path in `/nix/store`.
# As such, we need a cache to exist there, because pressure-vessel
···
, unshareNet ? false
, unshareUts ? true
, unshareCgroup ? true
+
, dieWithParent ? true
, ...
}:
···
buildFHSEnv = callPackage ./env.nix { };
env = buildFHSEnv (removeAttrs args [
+
"runScript" "extraInstallCommands" "meta" "passthru" "dieWithParent"
"unshareUser" "unshareCgroup" "unshareUts" "unshareNet" "unsharePid" "unshareIpc"
]);
···
files = [
# NixOS Compatibility
"static"
+
"nix" # mainly for nixUnstable users, but also for access to nix/netrc
+
# Shells
+
"bashrc"
+
"zshenv"
+
"zshrc"
+
"zinputrc"
+
"zprofile"
# Users, Groups, NSS
"passwd"
"group"
···
${lib.optionalString unshareNet "--unshare-net"}
${lib.optionalString unshareUts "--unshare-uts"}
${lib.optionalString unshareCgroup "--unshare-cgroup"}
+
${lib.optionalString dieWithParent "--die-with-parent"}
--ro-bind /nix /nix
# Our glibc will look for the cache in its own path in `/nix/store`.
# As such, we need a cache to exist there, because pressure-vessel
+7 -3
pkgs/data/icons/tela-icon-theme/default.nix
···
-
{ fetchFromGitHub, gtk3, hicolor-icon-theme, jdupes, lib, stdenv }:
-
stdenv.mkDerivation rec {
pname = "tela-icon-theme";
version = "2021-01-21";
···
dontDropIconThemeCache = true;
installPhase = ''
runHook preInstall
···
meta = with lib; {
description = "A flat colorful Design icon theme";
homepage = "https://github.com/vinceliuice/tela-icon-theme";
-
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ figsoda ];
};
···
+
{ fetchFromGitHub, gtk3, hicolor-icon-theme, jdupes, lib, stdenvNoCC }:
+
stdenvNoCC.mkDerivation rec {
pname = "tela-icon-theme";
version = "2021-01-21";
···
dontDropIconThemeCache = true;
+
# These fixup steps are slow and unnecessary.
+
dontPatchELF = true;
+
dontRewriteSymlinks = true;
+
installPhase = ''
runHook preInstall
···
meta = with lib; {
description = "A flat colorful Design icon theme";
homepage = "https://github.com/vinceliuice/tela-icon-theme";
+
license = licenses.gpl3Only;
platforms = platforms.unix;
maintainers = with maintainers; [ figsoda ];
};
+6 -1
pkgs/development/libraries/py3c/default.nix
···
sha256 = "04i2z7hrig78clc59q3i1z2hh24g7z1bfvxznlzxv00d4s57nhpi";
};
makeFlags = [
"prefix=${placeholder "out"}"
];
···
homepage = "https://github.com/encukou/py3c";
description = "Python 2/3 compatibility layer for C extensions";
license = licenses.mit;
-
maintainers = with maintainers; [ ajs124 ];
};
}
···
sha256 = "04i2z7hrig78clc59q3i1z2hh24g7z1bfvxznlzxv00d4s57nhpi";
};
+
postPatch = lib.optionalString stdenv.cc.isClang ''
+
substituteInPlace test/setup.py \
+
--replace "'-Werror', " ""
+
'';
+
makeFlags = [
"prefix=${placeholder "out"}"
];
···
homepage = "https://github.com/encukou/py3c";
description = "Python 2/3 compatibility layer for C extensions";
license = licenses.mit;
+
maintainers = with maintainers; [ ajs124 dotlambda ];
};
}
+2 -2
pkgs/development/python-modules/csvw/default.nix
···
buildPythonPackage rec {
pname = "csvw";
-
version = "1.10.1";
disabled = isPy27;
src = fetchFromGitHub {
owner = "cldf";
repo = "csvw";
rev = "v${version}";
-
sha256 = "1764nfa4frjdd7v6wj35y7prnciaqz57wwygy5zfavl4laxn4nxd";
};
patchPhase = ''
···
buildPythonPackage rec {
pname = "csvw";
+
version = "1.10.2";
disabled = isPy27;
src = fetchFromGitHub {
owner = "cldf";
repo = "csvw";
rev = "v${version}";
+
sha256 = "0z0qxlsfxwz1qapxb4d0mz3wkj99d7zi9yrg1cbd2xp7giagb6d4";
};
patchPhase = ''
+7 -4
pkgs/tools/graphics/pngquant/default.nix
···
stdenv.mkDerivation rec {
pname = "pngquant";
-
version = "2.12.5";
src = fetchFromGitHub {
-
owner = "pornel";
repo = "pngquant";
rev = version;
-
sha256 = "0sq398iv5cacblz6pb4j2hn16cnszsbkahikdpfq84rb9bj0ya40";
fetchSubmodules = true;
};
···
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libpng zlib lcms2 ];
meta = with lib; {
homepage = "https://pngquant.org/";
description = "A tool to convert 24/32-bit RGBA PNGs to 8-bit palette with alpha channel preserved";
platforms = platforms.unix;
-
license = licenses.gpl3;
maintainers = [ maintainers.volth ];
};
}
···
stdenv.mkDerivation rec {
pname = "pngquant";
+
version = "2.14.1";
src = fetchFromGitHub {
+
owner = "kornelski";
repo = "pngquant";
rev = version;
+
sha256 = "054hi33qp3jc7hv0141wi8drwdg24v5zfp8znwjmz4mcdls8vxbb";
fetchSubmodules = true;
};
···
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libpng zlib lcms2 ];
+
doCheck = true;
+
meta = with lib; {
homepage = "https://pngquant.org/";
description = "A tool to convert 24/32-bit RGBA PNGs to 8-bit palette with alpha channel preserved";
+
changelog = "https://github.com/kornelski/pngquant/raw/${version}/CHANGELOG";
platforms = platforms.unix;
+
license = with licenses; [ gpl3Plus hpnd bsd2 ];
maintainers = [ maintainers.volth ];
};
}
+5 -1
pkgs/top-level/all-packages.nix
···
gnvim = callPackage ../applications/editors/neovim/gnvim/wrapper.nix { };
-
neovim-remote = callPackage ../applications/editors/neovim/neovim-remote.nix { pythonPackages = python3Packages; };
vis = callPackage ../applications/editors/vis {
inherit (lua52Packages) lpeg;
···
};
vscode = callPackage ../applications/editors/vscode/vscode.nix { };
vscode-with-extensions = callPackage ../applications/editors/vscode/with-extensions.nix {};
···
vscode-extensions = recurseIntoAttrs (callPackage ../misc/vscode-extensions {});
vscodium = callPackage ../applications/editors/vscode/vscodium.nix { };
code-server = callPackage ../servers/code-server {
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Security;
···
gnvim = callPackage ../applications/editors/neovim/gnvim/wrapper.nix { };
+
neovim-remote = callPackage ../applications/editors/neovim/neovim-remote.nix { };
vis = callPackage ../applications/editors/vis {
inherit (lua52Packages) lpeg;
···
};
vscode = callPackage ../applications/editors/vscode/vscode.nix { };
+
vscode-fhs = vscode.fhs;
+
vscode-fhsWithPackages = vscode.fhsWithPackages;
vscode-with-extensions = callPackage ../applications/editors/vscode/with-extensions.nix {};
···
vscode-extensions = recurseIntoAttrs (callPackage ../misc/vscode-extensions {});
vscodium = callPackage ../applications/editors/vscode/vscodium.nix { };
+
vscodium-fhs = vscodium.fhs;
+
vscodium-fhsWithPackages = vscodium.fhsWithPackages;
code-server = callPackage ../servers/code-server {
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Security;