Merge master into staging-next

Changed files
+675 -166
nixos
doc
manual
from_md
release-notes
release-notes
modules
programs
pkgs
applications
misc
networking
browsers
mailreaders
evolution
evolution
virtualization
build-support
singularity-tools
data
misc
v2ray-geoip
development
libraries
SDL2_image
python-modules
docformatter
inkbird-ble
jaraco-abode
pyrainbird
xsdata
servers
tools
filesystems
moosefs
top-level
+46
nixos/doc/manual/from_md/release-notes/rl-2305.section.xml
···
</listitem>
<listitem>
<para>
+
As Singularity has renamed to
+
<link xlink:href="https://apptainer.org/news/community-announcement-20211130">Apptainer</link>
+
to distinguish from
+
<link xlink:href="https://sylabs.io/2021/05/singularity-community-edition">an
+
un-renamed fork by Sylabs Inc.</link>, there are now two
+
packages of Singularity/Apptainer:
+
</para>
+
<itemizedlist spacing="compact">
+
<listitem>
+
<para>
+
<literal>apptainer</literal>: From
+
<literal>github.com/apptainer/apptainer</literal>, which
+
is the new repo after renaming.
+
</para>
+
</listitem>
+
<listitem>
+
<para>
+
<literal>singularity</literal>: From
+
<literal>github.com/sylabs/singularity</literal>, which is
+
the fork by Sylabs Inc..
+
</para>
+
</listitem>
+
</itemizedlist>
+
<para>
+
<literal>programs.singularity</literal> got a new
+
<literal>package</literal> option to specify which package to
+
use.
+
</para>
+
<para>
+
<literal>singularity-tools.buildImage</literal> got a new
+
input argument <literal>singularity</literal> to specify which
+
package to use.
+
</para>
+
</listitem>
+
<listitem>
+
<para>
+
The new option
+
<literal>programs.singularity.enableFakeroot</literal>, if set
+
to <literal>true</literal>, provides
+
<literal>--fakeroot</literal> support for
+
<literal>apptainer</literal> and
+
<literal>singularity</literal>.
+
</para>
+
</listitem>
+
<listitem>
+
<para>
The <literal>unifi-poller</literal> package and corresponding
NixOS module have been renamed to <literal>unpoller</literal>
to match upstream.
+12
nixos/doc/manual/release-notes/rl-2305.section.md
···
- The `zramSwap` is now implemented with `zram-generator`, and the option `zramSwap.numDevices` for using ZRAM devices as general purpose ephemeral block devices has been removed.
+
- As Singularity has renamed to [Apptainer](https://apptainer.org/news/community-announcement-20211130)
+
to distinguish from [an un-renamed fork by Sylabs Inc.](https://sylabs.io/2021/05/singularity-community-edition),
+
there are now two packages of Singularity/Apptainer:
+
* `apptainer`: From `github.com/apptainer/apptainer`, which is the new repo after renaming.
+
* `singularity`: From `github.com/sylabs/singularity`, which is the fork by Sylabs Inc..
+
+
`programs.singularity` got a new `package` option to specify which package to use.
+
+
`singularity-tools.buildImage` got a new input argument `singularity` to specify which package to use.
+
+
- The new option `programs.singularity.enableFakeroot`, if set to `true`, provides `--fakeroot` support for `apptainer` and `singularity`.
+
- The `unifi-poller` package and corresponding NixOS module have been renamed to `unpoller` to match upstream.
- The new option `services.tailscale.useRoutingFeatures` controls various settings for using Tailscale features like exit nodes and subnet routers. If you wish to use your machine as an exit node, you can set this setting to `server`, otherwise if you wish to use an exit node you can set this setting to `client`. The strict RPF warning has been removed as the RPF will be loosened automatically based on the value of this setting.
+80 -22
nixos/modules/programs/singularity.nix
···
with lib;
let
cfg = config.programs.singularity;
-
singularity = pkgs.singularity.overrideAttrs (attrs : {
-
installPhase = attrs.installPhase + ''
-
mv $out/libexec/singularity/bin/starter-suid $out/libexec/singularity/bin/starter-suid.orig
-
ln -s /run/wrappers/bin/singularity-suid $out/libexec/singularity/bin/starter-suid
-
'';
-
});
-
in {
+
in
+
{
+
options.programs.singularity = {
-
enable = mkEnableOption (lib.mdDoc "Singularity");
+
enable = mkEnableOption (mdDoc "singularity") // {
+
description = mdDoc ''
+
Whether to install Singularity/Apptainer with system-level overriding such as SUID support.
+
'';
+
};
+
package = mkOption {
+
type = types.package;
+
default = pkgs.singularity;
+
defaultText = literalExpression "pkgs.singularity";
+
example = literalExpression "pkgs.apptainer";
+
description = mdDoc ''
+
Singularity/Apptainer package to override and install.
+
'';
+
};
+
packageOverriden = mkOption {
+
type = types.nullOr types.package;
+
default = null;
+
description = mdDoc ''
+
This option provides access to the overriden result of `programs.singularity.package`.
+
+
For example, the following configuration makes all the Nixpkgs packages use the overriden `singularity`:
+
```Nix
+
{ config, lib, pkgs, ... }:
+
{
+
nixpkgs.overlays = [
+
(final: prev: {
+
_singularity-orig = prev.singularity;
+
singularity = config.programs.singularity.packageOverriden;
+
})
+
];
+
programs.singularity.enable = true;
+
programs.singularity.package = pkgs._singularity-orig;
+
}
+
```
+
+
Use `lib.mkForce` to forcefully specify the overriden package.
+
'';
+
};
+
enableFakeroot = mkOption {
+
type = types.bool;
+
default = true;
+
example = false;
+
description = mdDoc ''
+
Whether to enable the `--fakeroot` support of Singularity/Apptainer.
+
'';
+
};
+
enableSuid = mkOption {
+
type = types.bool;
+
default = true;
+
example = false;
+
description = mdDoc ''
+
Whether to enable the SUID support of Singularity/Apptainer.
+
'';
+
};
};
config = mkIf cfg.enable {
-
environment.systemPackages = [ singularity ];
-
security.wrappers.singularity-suid =
-
{ setuid = true;
-
owner = "root";
-
group = "root";
-
source = "${singularity}/libexec/singularity/bin/starter-suid.orig";
-
};
-
systemd.tmpfiles.rules = [
-
"d /var/singularity/mnt/session 0770 root root -"
-
"d /var/singularity/mnt/final 0770 root root -"
-
"d /var/singularity/mnt/overlay 0770 root root -"
-
"d /var/singularity/mnt/container 0770 root root -"
-
"d /var/singularity/mnt/source 0770 root root -"
-
];
+
programs.singularity.packageOverriden = (cfg.package.override (
+
optionalAttrs cfg.enableFakeroot {
+
newuidmapPath = "/run/wrappers/bin/newuidmap";
+
newgidmapPath = "/run/wrappers/bin/newgidmap";
+
} // optionalAttrs cfg.enableSuid {
+
enableSuid = true;
+
starterSuidPath = "/run/wrappers/bin/${cfg.package.projectName}-suid";
+
}
+
));
+
environment.systemPackages = [ cfg.packageOverriden ];
+
security.wrappers."${cfg.packageOverriden.projectName}-suid" = mkIf cfg.enableSuid {
+
setuid = true;
+
owner = "root";
+
group = "root";
+
source = "${cfg.packageOverriden}/libexec/${cfg.packageOverriden.projectName}/bin/starter-suid.orig";
+
};
+
systemd.tmpfiles.rules = [
+
"d /var/lib/${cfg.packageOverriden.projectName}/mnt/session 0770 root root -"
+
"d /var/lib/${cfg.packageOverriden.projectName}/mnt/final 0770 root root -"
+
"d /var/lib/${cfg.packageOverriden.projectName}/mnt/overlay 0770 root root -"
+
"d /var/lib/${cfg.packageOverriden.projectName}/mnt/container 0770 root root -"
+
"d /var/lib/${cfg.packageOverriden.projectName}/mnt/source 0770 root root -"
+
];
};
}
+26
pkgs/applications/misc/ttdl/default.nix
···
+
{ lib
+
, rustPlatform
+
, fetchFromGitHub
+
}:
+
+
rustPlatform.buildRustPackage rec {
+
pname = "ttdl";
+
version = "3.6.3";
+
+
src = fetchFromGitHub {
+
owner = "VladimirMarkelov";
+
repo = "ttdl";
+
rev = "v${version}";
+
sha256 = "sha256-IR0cDXQHnMDI71Vg50atS98YorqAQKc95EF1+m9cxFY=";
+
};
+
+
cargoSha256 = "sha256-658mN3R3opjvqfnIDcbh11ZSOTDbpYnhCgGGx46Mrrc=";
+
+
meta = with lib; {
+
description = "A CLI tool to manage todo lists in todo.txt format";
+
homepage = "https://github.com/VladimirMarkelov/ttdl";
+
changelog = "https://github.com/VladimirMarkelov/ttdl/blob/v${version}/changelog";
+
license = with licenses; [ mit ];
+
maintainers = with maintainers; [ _3JlOy-PYCCKUi ];
+
};
+
}
+13 -13
pkgs/applications/networking/browsers/chromium/upstream-info.json
···
{
"stable": {
-
"version": "109.0.5414.119",
-
"sha256": "0bdyb14v12izxkldq27jx532p0bid3wdwfpd1mwm7jqswxgfzkfb",
-
"sha256bin64": "0iap6i4zmflp4fsj16knwdp03gixsdkbys0scbvvzs3fzy2r5zkx",
+
"version": "110.0.5481.77",
+
"sha256": "1kl1k29sr5qw8pg7shvizw4b37fxjlgah56p57kq641iqhnsnj73",
+
"sha256bin64": "0jjdgfps6siy9hk2r553vvh0jmkn987ad77sv2zqs9gvx0vsrwgp",
"deps": {
"gn": {
-
"version": "2022-11-10",
+
"version": "2022-12-12",
"url": "https://gn.googlesource.com/gn",
-
"rev": "1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41",
-
"sha256": "02621c9nqpr4pwcapy31x36l5kbyd0vdgd0wdaxj5p8hrxk67d6b"
+
"rev": "5e19d2fb166fbd4f6f32147fbb2f497091a54ad8",
+
"sha256": "1b5fwldfmkkbpp5x63n1dxv0nc965hphc8rm8ah7zg44zscm9z30"
}
},
"chromedriver": {
-
"version": "109.0.5414.74",
-
"sha256_linux": "1mhnw4maixwfhrz3r3mhpr9bl9hn7cvr2ji6y6ai32hxa1ix9m6f",
-
"sha256_darwin": "0w46xd05m7irfxqsfnjwgd2v65c9vgnh8awaknqgh02wmdgx3nm0",
-
"sha256_darwin_aarch64": "0amb2kd4cq4clir9gqr1b1mdy46m8nwzka227xxjd2i14vwzckb0"
+
"version": "110.0.5481.30",
+
"sha256_linux": "08j28ahyahlgmy67hcm8b1vd4kilvf2yvc25746a46gdf8zz0nmw",
+
"sha256_darwin": "0xlq0fi9g15yvd6ysqcfkxpbr37av32h0f3af9vxl8vbywjfsxn4",
+
"sha256_darwin_aarch64": "03j47ha9janbawbjxy9n84sx70iisk6qr0bvb218cq5j1d5x058b"
}
},
"beta": {
···
}
},
"dev": {
-
"version": "111.0.5563.8",
-
"sha256": "0gflrk5i6dr5vrywhxab73044gryxj49px59blgl6nyphw7swpwy",
-
"sha256bin64": "1dgfjz9pnziy1zymk7g15i5zdb002g77q8kqhkwgi4m0fndknpmj",
+
"version": "111.0.5563.19",
+
"sha256": "0hrapzi45jpkb1b87nzlb896jd2h2jbz1mq91md5r2y6ag6fc55w",
+
"sha256bin64": "02aaqny23dcdp611n6jr7swkjnx1wd0lb8dgxq53b806f0s374cp",
"deps": {
"gn": {
"version": "2022-12-12",
+7 -1
pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix
···
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
+
declare -a schemas;
+
for plugin in ${toString plugins}; do
+
for schema in $plugin/share/gsettings-schemas/*; do
+
schemas+=($schema);
+
done
+
done
for i in $out/bin/* $out/libexec/**; do
if [ ! -d $i ]; then
echo wrapping $i
-
wrapProgram $i --set EDS_EXTRA_PREFIXES "${lib.concatStringsSep ":" plugins}"
+
wrapProgram $i --set EDS_EXTRA_PREFIXES "${lib.concatStringsSep ":" plugins}" --prefix XDG_DATA_DIRS : "''${schemas[@]}"
fi
done
-73
pkgs/applications/virtualization/singularity/default.nix
···
-
{ lib
-
, fetchurl
-
, util-linux
-
, gpgme
-
, openssl
-
, libuuid
-
, coreutils
-
, which
-
, makeWrapper
-
, cryptsetup
-
, squashfsTools
-
, buildGoPackage}:
-
-
with lib;
-
-
buildGoPackage rec {
-
pname = "singularity";
-
version = "3.8.7";
-
-
src = fetchurl {
-
url = "https://github.com/hpcng/singularity/releases/download/v${version}/singularity-${version}.tar.gz";
-
sha256 = "sha256-Myny5YP4SoNDyywDgKHWy86vrn0eYztcvK33FD6shZs=";
-
};
-
-
goPackagePath = "github.com/sylabs/singularity";
-
-
buildInputs = [ gpgme openssl libuuid ];
-
nativeBuildInputs = [ util-linux which makeWrapper cryptsetup ];
-
propagatedBuildInputs = [ coreutils squashfsTools ];
-
-
postPatch = ''
-
substituteInPlace internal/pkg/build/files/copy.go \
-
--replace /bin/cp ${coreutils}/bin/cp
-
'';
-
-
postConfigure = ''
-
cd go/src/github.com/sylabs/singularity
-
-
patchShebangs .
-
sed -i 's|defaultPath := "[^"]*"|defaultPath := "${lib.makeBinPath propagatedBuildInputs}"|' cmd/internal/cli/actions.go
-
-
./mconfig -V ${version} -p $out --localstatedir=/var
-
-
# Don't install SUID binaries
-
sed -i 's/-m 4755/-m 755/g' builddir/Makefile
-
'';
-
-
buildPhase = ''
-
runHook preBuild
-
make -C builddir
-
runHook postBuild
-
'';
-
-
installPhase = ''
-
runHook preInstall
-
make -C builddir install LOCALSTATEDIR=$out/var
-
chmod 755 $out/libexec/singularity/bin/starter-suid
-
-
# Explicitly configure paths in the config file
-
sed -i 's|^# mksquashfs path =.*$|mksquashfs path = ${lib.makeBinPath [squashfsTools]}/mksquashfs|' $out/etc/singularity/singularity.conf
-
sed -i 's|^# cryptsetup path =.*$|cryptsetup path = ${lib.makeBinPath [cryptsetup]}/cryptsetup|' $out/etc/singularity/singularity.conf
-
-
runHook postInstall
-
'';
-
-
meta = with lib; {
-
homepage = "http://www.sylabs.io/";
-
description = "Application containers for linux";
-
license = licenses.bsd3;
-
platforms = platforms.linux;
-
maintainers = [ maintainers.jbedo ];
-
};
-
}
+236
pkgs/applications/virtualization/singularity/generic.nix
···
+
# Configurations that should only be overrided by
+
# overrideAttrs
+
{ pname
+
, version
+
, src
+
, projectName # "apptainer" or "singularity"
+
, vendorHash ? null
+
, deleteVendor ? false
+
, proxyVendor ? false
+
, extraConfigureFlags ? [ ]
+
, extraDescription ? ""
+
, extraMeta ? { }
+
}:
+
+
let
+
# Workaround for vendor-related attributes not overridable (#86349)
+
# should be removed when the issue is resolved
+
_defaultGoVendorArgs = {
+
inherit
+
vendorHash
+
deleteVendor
+
proxyVendor
+
;
+
};
+
in
+
{ lib
+
, buildGoModule
+
, runCommandLocal
+
# Native build inputs
+
, makeWrapper
+
, pkg-config
+
, util-linux
+
, which
+
# Build inputs
+
, bash
+
, conmon
+
, coreutils
+
, cryptsetup
+
, fakeroot
+
, go
+
, gpgme
+
, libseccomp
+
, libuuid
+
# This is for nvidia-container-cli
+
, nvidia-docker
+
, openssl
+
, squashfsTools
+
, squashfuse
+
# Overridable configurations
+
, enableNvidiaContainerCli ? true
+
# Compile with seccomp support
+
# SingularityCE 3.10.0 and above requires explicit --without-seccomp when libseccomp is not available.
+
, enableSeccomp ? true
+
# Whether the configure script treat SUID support as default
+
, defaultToSuid ? true
+
# Whether to compile with SUID support
+
, enableSuid ? false
+
, starterSuidPath ? null
+
# newuidmapPath and newgidmapPath are to support --fakeroot
+
# where those SUID-ed executables are unavailable from the FHS system PATH.
+
# Path to SUID-ed newuidmap executable
+
, newuidmapPath ? null
+
# Path to SUID-ed newgidmap executable
+
, newgidmapPath ? null
+
# Remove the symlinks to `singularity*` when projectName != "singularity"
+
, removeCompat ? false
+
# Workaround #86349
+
# should be removed when the issue is resolved
+
, vendorHash ? _defaultGoVendorArgs.vendorHash
+
, deleteVendor ? _defaultGoVendorArgs.deleteVendor
+
, proxyVendor ? _defaultGoVendorArgs.proxyVendor
+
}:
+
+
let
+
defaultPathOriginal = "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
+
privileged-un-utils = if ((isNull newuidmapPath) && (isNull newgidmapPath)) then null else
+
(runCommandLocal "privileged-un-utils" { } ''
+
mkdir -p "$out/bin"
+
ln -s ${lib.escapeShellArg newuidmapPath} "$out/bin/newuidmap"
+
ln -s ${lib.escapeShellArg newgidmapPath} "$out/bin/newgidmap"
+
'');
+
in
+
buildGoModule {
+
inherit pname version src;
+
+
# Override vendorHash with the output got from
+
# nix-prefetch -E "{ sha256 }: ((import ./. { }).apptainer.override { vendorHash = sha256; }).go-modules"
+
# or with `null` when using vendored source tarball.
+
inherit vendorHash deleteVendor proxyVendor;
+
+
# go is used to compile extensions when building container images
+
allowGoReference = true;
+
+
strictDeps = true;
+
+
passthru = {
+
inherit
+
enableSeccomp
+
enableSuid
+
projectName
+
removeCompat
+
starterSuidPath
+
;
+
};
+
+
nativeBuildInputs = [
+
makeWrapper
+
pkg-config
+
util-linux
+
which
+
];
+
+
buildInputs = [
+
bash # To patch /bin/sh shebangs.
+
conmon
+
cryptsetup
+
gpgme
+
libuuid
+
openssl
+
squashfsTools
+
squashfuse
+
]
+
++ lib.optional enableNvidiaContainerCli nvidia-docker
+
++ lib.optional enableSeccomp libseccomp
+
;
+
+
configureScript = "./mconfig";
+
+
configureFlags = [
+
"--localstatedir=/var/lib"
+
"--runstatedir=/var/run"
+
]
+
++ lib.optional (!enableSeccomp) "--without-seccomp"
+
++ lib.optional (defaultToSuid && !enableSuid) "--without-suid"
+
++ lib.optional (!defaultToSuid && enableSuid) "--with-suid"
+
++ extraConfigureFlags
+
;
+
+
# Packages to prefix to the Apptainer/Singularity container runtime default PATH
+
# Use overrideAttrs to override
+
defaultPathInputs = [
+
bash
+
coreutils
+
cryptsetup # cryptsetup
+
go
+
privileged-un-utils
+
squashfsTools # mksquashfs unsquashfs # Make / unpack squashfs image
+
squashfuse # squashfuse_ll squashfuse # Mount (without unpacking) a squashfs image without privileges
+
]
+
++ lib.optional enableNvidiaContainerCli nvidia-docker
+
;
+
+
postPatch = ''
+
if [[ ! -e .git || ! -e VERSION ]]; then
+
echo "${version}" > VERSION
+
fi
+
# Patch shebangs for script run during build
+
patchShebangs --build "$configureScript" makeit e2e scripts mlocal/scripts
+
# Patching the hard-coded defaultPath by prefixing the packages in defaultPathInputs
+
substituteInPlace cmd/internal/cli/actions.go \
+
--replace "defaultPath = \"${defaultPathOriginal}\"" "defaultPath = \"''${defaultPathInputs// /\/bin:}''${defaultPathInputs:+/bin:}${defaultPathOriginal}\""
+
'';
+
+
postConfigure = ''
+
# Code borrowed from pkgs/stdenv/generic/setup.sh configurePhase()
+
+
# set to empty if unset
+
: ''${configureFlags=}
+
+
# shellcheck disable=SC2086
+
$configureScript -V ${version} "''${prefixKey:---prefix=}$prefix" $configureFlags "''${configureFlagsArray[@]}"
+
+
# End of the code from pkgs/stdenv/generic/setup.sh configurPhase()
+
'';
+
+
buildPhase = ''
+
runHook preBuild
+
make -C builddir -j"$NIX_BUILD_CORES"
+
runHook postBuild
+
'';
+
+
installPhase = ''
+
runHook preInstall
+
make -C builddir install LOCALSTATEDIR="$out/var/lib"
+
runHook postInstall
+
'';
+
+
postFixup = ''
+
substituteInPlace "$out/bin/run-singularity" \
+
--replace "/usr/bin/env ${projectName}" "$out/bin/${projectName}"
+
wrapProgram "$out/bin/${projectName}" \
+
--prefix PATH : "${lib.makeBinPath [
+
fakeroot
+
squashfsTools # Singularity (but not Apptainer) expects unsquashfs from the host PATH
+
]}"
+
# Make changes in the config file
+
${lib.optionalString enableNvidiaContainerCli ''
+
substituteInPlace "$out/etc/${projectName}/${projectName}.conf" \
+
--replace "use nvidia-container-cli = no" "use nvidia-container-cli = yes"
+
''}
+
${lib.optionalString (removeCompat && (projectName != "singularity")) ''
+
unlink "$out/bin/singularity"
+
for file in "$out"/share/man/man?/singularity*.gz; do
+
if [[ -L "$file" ]]; then
+
unlink "$file"
+
fi
+
done
+
for file in "$out"/share/*-completion/completions/singularity; do
+
if [[ -e "$file" ]]
+
rm "$file"
+
done
+
''}
+
${lib.optionalString enableSuid (lib.warnIf (isNull starterSuidPath) "${projectName}: Null starterSuidPath when enableSuid produces non-SUID-ed starter-suid and run-time permission denial." ''
+
chmod +x $out/libexec/${projectName}/bin/starter-suid
+
'')}
+
${lib.optionalString (enableSuid && !isNull starterSuidPath) ''
+
mv "$out"/libexec/${projectName}/bin/starter-suid{,.orig}
+
ln -s ${lib.escapeShellArg starterSuidPath} "$out/libexec/${projectName}/bin/starter-suid"
+
''}
+
'';
+
+
meta = with lib; {
+
description = "Application containers for linux" + extraDescription;
+
longDescription = ''
+
Singularity (the upstream) renamed themselves to Apptainer
+
to distinguish themselves from a fork made by Sylabs Inc.. See
+
+
https://sylabs.io/2021/05/singularity-community-edition
+
https://apptainer.org/news/community-announcement-20211130
+
'';
+
license = licenses.bsd3;
+
platforms = platforms.linux;
+
maintainers = with maintainers; [ jbedo ShamrockLee ];
+
mainProgram = projectName;
+
} // extraMeta;
+
}
+94
pkgs/applications/virtualization/singularity/packages.nix
···
+
{ callPackage
+
, fetchFromGitHub
+
, nixos
+
, conmon
+
}:
+
let
+
apptainer = callPackage
+
(import ./generic.nix rec {
+
pname = "apptainer";
+
# TODO: Upgrade to 1.1.4 only after https://github.com/apptainer/apptainer/pull/967 get merge
+
# and https://github.com/apptainer/apptainer/issues/958 get fixed
+
version = "1.1.3";
+
projectName = "apptainer";
+
+
src = fetchFromGitHub {
+
owner = "apptainer";
+
repo = "apptainer";
+
rev = "v${version}";
+
hash = "sha256-QFg6RC77OE/a6Qlzn6Zi5I7Iaq/U3/m0eI9yLArzuNc=";
+
};
+
+
# Update by running
+
# nix-prefetch -E "{ sha256 }: ((import ./. { }).apptainer.override { vendorHash = sha256; }).go-modules"
+
# at the root directory of the Nixpkgs repository
+
vendorHash = "sha256-tAnh7A8Lw5KtY7hq+sqHMEUlgXvgeeCKKIfRZFoRtug=";
+
+
extraDescription = " (previously known as Singularity)";
+
extraMeta.homepage = "https://apptainer.org";
+
})
+
{
+
# Apptainer doesn't depend on conmon
+
conmon = null;
+
+
# defaultToSuid becomes false since Apptainer 1.1.0
+
# https://github.com/apptainer/apptainer/pull/495
+
# https://github.com/apptainer/apptainer/releases/tag/v1.1.0
+
defaultToSuid = false;
+
};
+
+
singularity = callPackage
+
(import ./generic.nix rec {
+
pname = "singularity-ce";
+
version = "3.10.4";
+
projectName = "singularity";
+
+
src = fetchFromGitHub {
+
owner = "sylabs";
+
repo = "singularity";
+
rev = "v${version}";
+
hash = "sha256-bUnQXQVwaVA3Lkw3X9TBWqNBgiPxAVCHnkq0vc+CIsM=";
+
};
+
+
# Update by running
+
# nix-prefetch -E "{ sha256 }: ((import ./. { }).singularity.override { vendorHash = sha256; }).go-modules"
+
# at the root directory of the Nixpkgs repository
+
vendorHash = "sha256-K8helLcOuz3E4LzBE9y3pnZqwdwhO/iMPTN1o22ipVg=";
+
+
# Do not build conmon from the Git submodule source,
+
# Use Nixpkgs provided version
+
extraConfigureFlags = [
+
"--without-conmon"
+
];
+
+
extraDescription = " (Sylabs Inc's fork of Singularity, a.k.a. SingularityCE)";
+
extraMeta.homepage = "https://sylabs.io/";
+
})
+
{
+
defaultToSuid = true;
+
};
+
+
genOverridenNixos = package: packageName: (nixos {
+
programs.singularity = {
+
enable = true;
+
inherit package;
+
};
+
}).config.programs.singularity.packageOverriden.overrideAttrs (oldAttrs: {
+
meta = oldAttrs.meta // {
+
description = "";
+
longDescription = ''
+
This package produces identical store derivations to `pkgs.${packageName}`
+
overriden and installed by the NixOS module `programs.singularity`
+
with default configuration.
+
+
This is for binary substitutes only. Use pkgs.${packageName} instead.
+
'';
+
};
+
});
+
in
+
{
+
inherit apptainer singularity;
+
+
apptainer-overriden-nixos = genOverridenNixos apptainer "apptainer";
+
singularity-overriden-nixos = genOverridenNixos singularity "singularity";
+
}
+46 -34
pkgs/build-support/singularity-tools/default.nix
···
, gawk
, util-linux
, runtimeShell
-
, e2fsprogs }:
-
+
, e2fsprogs
+
}:
rec {
shellScript = name: text:
writeScript name ''
···
${text}
'';
-
mkLayer = {
-
name,
-
contents ? [],
-
}:
-
runCommand "singularity-layer-${name}" {
-
inherit contents;
-
} ''
+
mkLayer =
+
{ name
+
, contents ? [ ]
+
# May be "apptainer" instead of "singularity"
+
, projectName ? (singularity.projectName or "singularity")
+
}:
+
runCommand "${projectName}-layer-${name}"
+
{
+
inherit contents;
+
} ''
mkdir $out
for f in $contents ; do
cp -ra $f $out/
done
'';
-
buildImage = {
-
name,
-
contents ? [],
-
diskSize ? 1024,
-
runScript ? "#!${stdenv.shell}\nexec /bin/sh",
-
runAsRoot ? null,
-
memSize ? 512
-
}:
-
let layer = mkLayer {
-
inherit name;
-
contents = contents ++ [ bash runScriptFile ];
-
};
-
runAsRootFile = shellScript "run-as-root.sh" runAsRoot;
-
runScriptFile = shellScript "run-script.sh" runScript;
-
result = vmTools.runInLinuxVM (
-
runCommand "singularity-image-${name}.img" {
+
buildImage =
+
let
+
defaultSingularity = singularity;
+
in
+
{ name
+
, contents ? [ ]
+
, diskSize ? 1024
+
, runScript ? "#!${stdenv.shell}\nexec /bin/sh"
+
, runAsRoot ? null
+
, memSize ? 512
+
, singularity ? defaultSingularity
+
}:
+
let
+
projectName = singularity.projectName or "singularity";
+
layer = mkLayer {
+
inherit name;
+
contents = contents ++ [ bash runScriptFile ];
+
inherit projectName;
+
};
+
runAsRootFile = shellScript "run-as-root.sh" runAsRoot;
+
runScriptFile = shellScript "run-script.sh" runScript;
+
result = vmTools.runInLinuxVM (
+
runCommand "${projectName}-image-${name}.img"
+
{
buildInputs = [ singularity e2fsprogs util-linux gawk ];
layerClosure = writeReferencesToFile layer;
preVM = vmTools.createEmptyImage {
size = diskSize;
-
fullName = "singularity-run-disk";
+
fullName = "${projectName}-run-disk";
};
inherit memSize;
}
···
if [ ! -e bin/sh ]; then
ln -s ${runtimeShell} bin/sh
fi
-
mkdir -p .singularity.d
-
ln -s ${runScriptFile} .singularity.d/runscript
+
mkdir -p .${projectName}.d
+
ln -s ${runScriptFile} .${projectName}.d/runscript
-
# Fill out .singularity.d
-
mkdir -p .singularity.d/env
-
touch .singularity.d/env/94-appsbase.sh
+
# Fill out .${projectName}.d
+
mkdir -p .${projectName}.d/env
+
touch .${projectName}.d/env/94-appsbase.sh
cd ..
-
mkdir -p /var/singularity/mnt/{container,final,overlay,session,source}
+
mkdir -p /var/lib/${projectName}/mnt/{container,final,overlay,session,source}
echo "root:x:0:0:System administrator:/root:/bin/sh" > /etc/passwd
echo > /etc/resolv.conf
-
TMPDIR=$(pwd -P) singularity build $out ./img
+
TMPDIR=$(pwd -P) ${projectName} build $out ./img
'');
-
in result;
+
in
+
result;
}
+3 -3
pkgs/data/misc/v2ray-geoip/default.nix
···
stdenv.mkDerivation rec {
pname = "v2ray-geoip";
-
version = "202302020047";
+
version = "202302081046";
src = fetchFromGitHub {
owner = "v2fly";
repo = "geoip";
-
rev = "9ab244ed78fea88a1ce5bf789fb31bbcd81e8d17";
-
sha256 = "sha256-2NYuvzOU0W3qZqWZMr3rTNqX+0rH3fhIr1zCD5dSdWc=";
+
rev = "d85771a99440dd75294bfd9d00011307b7596d0d";
+
sha256 = "sha256-gVL7koUG3BgY8HAYWa2fTwTJIE3svGUgauwI1jlA2/M=";
};
installPhase = ''
+8 -3
pkgs/development/libraries/SDL2_image/default.nix
···
{ lib, stdenv, fetchurl
, pkg-config
, SDL2, libpng, libjpeg, libtiff, giflib, libwebp, libXpm, zlib, Foundation
+
, version ? "2.6.3"
+
, hash ? "sha256-kxyb5b8dfI+um33BV4KLfu6HTiPH8ktEun7/a0g2MSw="
}:
-
stdenv.mkDerivation rec {
+
let
pname = "SDL2_image";
-
version = "2.0.5";
+
in
+
+
stdenv.mkDerivation {
+
inherit pname version;
src = fetchurl {
url = "https://www.libsdl.org/projects/SDL_image/release/${pname}-${version}.tar.gz";
-
sha256 = "1l0864kas9cwpp2d32yxl81g98lx40dhbdp03dz7sbv84vhgdmdx";
+
inherit hash;
};
nativeBuildInputs = [ pkg-config ];
+24 -3
pkgs/development/python-modules/docformatter/default.nix
···
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
+
, poetry-core
+
, charset-normalizer
+
, tomli
, untokenize
, mock
, pytestCheckHook
···
buildPythonPackage rec {
pname = "docformatter";
-
version = "1.5.0";
+
version = "1.5.1";
disabled = pythonOlder "3.6";
-
format = "setuptools";
+
format = "pyproject";
src = fetchFromGitHub {
owner = "PyCQA";
repo = pname;
rev = "refs/tags/v${version}";
-
hash = "sha256-GSfsM6sPSLOIH0YJYFVTB3SigI62/ps51mA2iZ7GOEg=";
+
hash = "sha256-r+8FOl9Rrfi3V8f8wD41bRsaqDb+UrOBWuR3goK43xY=";
};
+
patches = [
+
./test-path.patch
+
];
+
+
postPatch = ''
+
substituteInPlace pyproject.toml \
+
--replace 'charset_normalizer = "^2.0.0"' 'charset_normalizer = ">=2.0.0"'
+
substituteInPlace tests/conftest.py \
+
--subst-var-by docformatter $out/bin/docformatter
+
'';
+
+
nativeBuildInputs = [
+
poetry-core
+
];
+
propagatedBuildInputs = [
+
charset-normalizer
+
tomli
untokenize
];
···
pythonImportsCheck = [ "docformatter" ];
meta = {
+
changelog = "https://github.com/PyCQA/docformatter/blob/${src.rev}/CHANGELOG.md";
description = "Formats docstrings to follow PEP 257";
homepage = "https://github.com/myint/docformatter";
license = lib.licenses.mit;
+29
pkgs/development/python-modules/docformatter/test-path.patch
···
+
diff --git a/tests/conftest.py b/tests/conftest.py
+
index 5f5a9aa..3289222 100644
+
--- a/tests/conftest.py
+
+++ b/tests/conftest.py
+
@@ -92,21 +92,9 @@ def run_docformatter(arguments, temporary_file):
+
+
Return subprocess object.
+
"""
+
- if "DOCFORMATTER_COVERAGE" in os.environ and int(
+
- os.environ["DOCFORMATTER_COVERAGE"]
+
- ):
+
- DOCFORMATTER_COMMAND = [
+
- "coverage",
+
- "run",
+
- "--branch",
+
- "--parallel",
+
- "--omit=*/site-packages/*",
+
- os.environ["VIRTUAL_ENV"] + "/bin/docformatter",
+
- ]
+
- else:
+
- DOCFORMATTER_COMMAND = [
+
- os.environ["VIRTUAL_ENV"] + "/bin/docformatter",
+
- ] # pragma: no cover
+
+ DOCFORMATTER_COMMAND = [
+
+ "@docformatter@"
+
+ ]
+
+
if "-" not in arguments:
+
arguments.append(temporary_file)
+2 -2
pkgs/development/python-modules/inkbird-ble/default.nix
···
buildPythonPackage rec {
pname = "inkbird-ble";
-
version = "0.5.5";
+
version = "0.5.6";
format = "pyproject";
disabled = pythonOlder "3.9";
···
owner = "Bluetooth-Devices";
repo = pname;
rev = "v${version}";
-
hash = "sha256-KUBOjeFM4h2Qt9eT0mQKPFYJJ8OWdbYy9+AiHsJWNyU=";
+
hash = "sha256-re5HjPtssFkpcltCr0HEJmJyHbXJdkr2wDgaAHfy2Tk=";
};
nativeBuildInputs = [
+2 -2
pkgs/development/python-modules/jaraco-abode/default.nix
···
buildPythonPackage rec {
pname = "jaraco-abode";
-
version = "3.2.1";
+
version = "3.3.0";
disabled = pythonOlder "3.7";
···
owner = "jaraco";
repo = "jaraco.abode";
rev = "refs/tags/v${version}";
-
hash = "sha256-ZDdZba1oTOPaUm+r4fWC5E3ni/k8kXo6t5AWQTvfd5E=";
+
hash = "sha256-LnbWzIST+GMtdsHDKg67WWt9GmHUcSuGZ5Spei3nEio=";
};
postPatch = ''
+14 -2
pkgs/development/python-modules/pyrainbird/default.nix
···
{ lib
, buildPythonPackage
, fetchFromGitHub
+
, freezegun
+
, ical
, parameterized
, pycryptodome
, pydantic
, pytest-aiohttp
+
, pytest-asyncio
+
, pytest-golden
+
, pytest-mock
, pytestCheckHook
+
, python-dateutil
, pythonOlder
, pyyaml
, requests
···
buildPythonPackage rec {
pname = "pyrainbird";
-
version = "1.1.1";
+
version = "2.0.0";
format = "setuptools";
disabled = pythonOlder "3.9";
···
owner = "allenporter";
repo = pname;
rev = "refs/tags/${version}";
-
hash = "sha256-e+neyzH+sGTzGwdy/N7n6GUvctHlHQgwDkRQsnzL7Jw=";
+
hash = "sha256-fQHWamtGA1Cz/9Hbxbns5lDd08Q01nIvaMXp9PWrelM=";
};
postPatch = ''
···
'';
propagatedBuildInputs = [
+
ical
pycryptodome
pydantic
+
python-dateutil
pyyaml
requests
];
nativeCheckInputs = [
+
freezegun
parameterized
pytest-aiohttp
+
pytest-asyncio
+
pytest-golden
+
pytest-mock
pytestCheckHook
requests-mock
responses
+11
pkgs/development/python-modules/xsdata/default.nix
···
, buildPythonPackage
, pythonOlder
, fetchPypi
+
, fetchpatch
, click
, click-default-group
, docformatter
···
inherit pname version;
hash = "sha256-o9Xxt7b/+MkW94Jcg26ihaTn0/OpTcu+0OY7oV3JRGY=";
};
+
+
patches = [
+
# https://github.com/tefra/xsdata/pull/741
+
(fetchpatch {
+
name = "use-docformatter-1.5.1.patch";
+
url = "https://github.com/tefra/xsdata/commit/040692db47e6e51028fd959c793e757858c392d7.patch";
+
excludes = [ "setup.cfg" ];
+
hash = "sha256-ncecMJLJUiUb4lB8ys+nyiGU/UmayK++o89h3sAwREQ=";
+
})
+
];
postPatch = ''
substituteInPlace setup.cfg \
+1 -1
pkgs/servers/home-assistant/component-packages.nix
···
# Do not edit!
{
-
version = "2023.2.2";
+
version = "2023.2.3";
components = {
"3_day_blinds" = ps: with ps; [
];
+2 -2
pkgs/servers/home-assistant/default.nix
···
extraPackagesFile = writeText "home-assistant-packages" (lib.concatMapStringsSep "\n" (pkg: pkg.pname) extraBuildInputs);
# Don't forget to run parse-requirements.py after updating
-
hassVersion = "2023.2.2";
+
hassVersion = "2023.2.3";
in python.pkgs.buildPythonApplication rec {
pname = "homeassistant";
···
owner = "home-assistant";
repo = "core";
rev = "refs/tags/${version}";
-
hash = "sha256-HEL8e/2zoWPjeJL9iaCRu8aIldE3uTw9Yu9Q06Nyvz4=";
+
hash = "sha256-cRdxlmlgkKTnrtqGQPbSpBLHf+vfI9T6sdETcGshN9M=";
};
nativeBuildInputs = with python3.pkgs; [
+2 -2
pkgs/tools/filesystems/moosefs/default.nix
···
stdenv.mkDerivation rec {
pname = "moosefs";
-
version = "3.0.116";
+
version = "3.0.117";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
-
sha256 = "sha256-/+l4BURvL1R6te6tlXRJx7YBDyYuMrGnzzhMc9XeXKc=";
+
sha256 = "sha256-6zBMAi9ruPPlcnpdgqwl35QZ5u4MyFPUa70yvGTkHpo=";
};
nativeBuildInputs = [
+16 -3
pkgs/top-level/all-packages.nix
···
tthsum = callPackage ../applications/misc/tthsum { };
+
ttdl = callPackage ../applications/misc/ttdl { };
+
ttp = with python3.pkgs; toPythonApplication ttp;
trace-cmd = callPackage ../os-specific/linux/trace-cmd { };
···
SDL2_image = callPackage ../development/libraries/SDL2_image {
inherit (darwin.apple_sdk.frameworks) Foundation;
+
SDL2_image_2_0_5 = SDL2_image.override({ # Pinned for pygame, toppler
+
version = "2.0.5";
+
hash = "sha256-vdX24CZoL31+G+C2BRsgnaL0AqLdi9HEvZwlrSYxCNA";
+
});
SDL2_mixer = callPackage ../development/libraries/SDL2_mixer {
inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit AudioToolbox;
···
shepherd = nodePackages."@nerdwallet/shepherd";
+
inherit (callPackage ../applications/virtualization/singularity/packages.nix { })
+
apptainer
+
singularity
+
apptainer-overriden-nixos
+
singularity-overriden-nixos
+
;
+
skate = callPackage ../applications/misc/skate { };
slack = callPackage ../applications/networking/instant-messengers/slack { };
···
slack-term = callPackage ../applications/networking/instant-messengers/slack-term { };
slweb = callPackage ../applications/misc/slweb { };
-
-
singularity = callPackage ../applications/virtualization/singularity { };
sonixd = callPackage ../applications/audio/sonixd { };
···
tome4 = callPackage ../games/tome4 { };
-
toppler = callPackage ../games/toppler { };
+
toppler = callPackage ../games/toppler {
+
SDL2_image = SDL2_image_2_0_5;
+
};
torus-trooper = callPackage ../games/torus-trooper { };
+1
pkgs/top-level/python-packages.nix
···
pygame = callPackage ../development/python-modules/pygame {
inherit (pkgs.darwin.apple_sdk.frameworks) AppKit;
+
SDL2_image = pkgs.SDL2_image_2_0_5;
};
pygame_sdl2 = callPackage ../development/python-modules/pygame_sdl2 { };