···72727373A number of fetcher functions wrap part of `fetchurl` and `fetchzip`. They are mainly convenience functions intended for commonly used destinations of source code in Nixpkgs. These wrapper fetchers are listed below.
74747575+## `fetchFromGitea` {#fetchfromgitea}
7676+7777+`fetchFromGitea` expects five arguments. `domain` is the gitea server name. `owner` is a string corresponding to the Gitea user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every Gitea HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `sha256` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `sha256` is currently preferred.
7878+7579## `fetchFromGitHub` {#fetchfromgithub}
76807781`fetchFromGitHub` expects four arguments. `owner` is a string corresponding to the GitHub user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `sha256` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `sha256` is currently preferred.
+1-1
doc/languages-frameworks/texlive.section.md
···6677- For basic usage just pull `texlive.combined.scheme-basic` for an environment with basic LaTeX support.
8899-- It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this:
99+- It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this. Most CTAN packages should be available:
10101111 ```nix
1212 texlive.combine {
···282282 # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
283283 loadModule = args: fallbackFile: fallbackKey: m:
284284 if isFunction m || isAttrs m then
285285- unifyModuleSyntax fallbackFile fallbackKey (applyIfFunction fallbackKey m args)
285285+ unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgsIfFunction fallbackKey m args)
286286 else if isList m then
287287 let defs = [{ file = fallbackFile; value = m; }]; in
288288 throw "Module imports can't be nested lists. Perhaps you meant to remove one level of lists? Definitions: ${showDefs defs}"
289289- else unifyModuleSyntax (toString m) (toString m) (applyIfFunction (toString m) (import m) args);
289289+ else unifyModuleSyntax (toString m) (toString m) (applyModuleArgsIfFunction (toString m) (import m) args);
290290291291 /*
292292 Collects all modules recursively into the form
···383383 config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]));
384384 };
385385386386- applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
386386+ applyModuleArgsIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
387387 let
388388 # Module arguments are resolved in a strict manner when attribute set
389389 # deconstruction is used. As the arguments are now defined with the
+19
lib/trivial.nix
···441441 isFunction = f: builtins.isFunction f ||
442442 (f ? __functor && isFunction (f.__functor f));
443443444444+ /*
445445+ Turns any non-callable values into constant functions.
446446+ Returns callable values as is.
447447+448448+ Example:
449449+450450+ nix-repl> lib.toFunction 1 2
451451+ 1
452452+453453+ nix-repl> lib.toFunction (x: x + 1) 2
454454+ 3
455455+ */
456456+ toFunction =
457457+ # Any value
458458+ v:
459459+ if isFunction v
460460+ then v
461461+ else k: v;
462462+444463 /* Convert the given positive integer to a string of its hexadecimal
445464 representation. For example:
446465
···480480 </listitem>
481481 <listitem>
482482 <para>
483483+ <literal>services.ipfs.extraFlags</literal> is now escaped
484484+ with <literal>utils.escapeSystemdExecArgs</literal>. If you
485485+ rely on systemd interpolating <literal>extraFlags</literal> in
486486+ the service <literal>ExecStart</literal>, this will no longer
487487+ work.
488488+ </para>
489489+ </listitem>
490490+ <listitem>
491491+ <para>
483492 The <literal>matrix-synapse</literal> service
484493 (<literal>services.matrix-synapse</literal>) has been
485494 converted to use the <literal>settings</literal> option
+2
nixos/doc/manual/release-notes/rl-2205.section.md
···161161162162- The `mailpile` email webclient (`services.mailpile`) has been removed due to its reliance on python2.
163163164164+- `services.ipfs.extraFlags` is now escaped with `utils.escapeSystemdExecArgs`. If you rely on systemd interpolating `extraFlags` in the service `ExecStart`, this will no longer work.
165165+164166- The `matrix-synapse` service (`services.matrix-synapse`) has been converted to use the `settings` option defined in RFC42.
165167 This means that options that are part of your `homeserver.yaml` configuration, and that were specified at the top-level of the
166168 module (`services.matrix-synapse`) now need to be moved into `services.matrix-synapse.settings`. And while not all options you
+14-16
nixos/lib/testing-python.nix
···146146147147 # Make a full-blown test
148148 makeTest =
149149- { testScript
149149+ { machine ? null
150150+ , nodes ? {}
151151+ , testScript
150152 , enableOCR ? false
151153 , name ? "unnamed"
152154 # Skip linting (mainly intended for faster dev cycles)
153155 , skipLint ? false
154156 , passthru ? {}
157157+ , meta ? {}
155158 , # For meta.position
156159 pos ? # position used in error messages and for meta.position
157157- (if t.meta.description or null != null
158158- then builtins.unsafeGetAttrPos "description" t.meta
160160+ (if meta.description or null != null
161161+ then builtins.unsafeGetAttrPos "description" meta
159162 else builtins.unsafeGetAttrPos "testScript" t)
160160- , ...
161163 } @ t:
162164 let
163163- nodes = qemu_pkg:
165165+ mkNodes = qemu_pkg:
164166 let
165167 testScript' =
166168 # Call the test script with the computed nodes.
167169 if lib.isFunction testScript
168168- then testScript { nodes = nodes qemu_pkg; }
170170+ then testScript { nodes = mkNodes qemu_pkg; }
169171 else testScript;
170172171173 build-vms = import ./build-vms.nix {
···205207 };
206208 in
207209 build-vms.buildVirtualNetwork (
208208- t.nodes or (if t ? machine then { machine = t.machine; } else { })
210210+ nodes // lib.optionalAttrs (machine != null) { inherit machine; }
209211 );
210212211213 driver = setupDriverForTest {
212214 inherit testScript enableOCR skipLint passthru;
213215 testName = name;
214216 qemu_pkg = pkgs.qemu_test;
215215- nodes = nodes pkgs.qemu_test;
217217+ nodes = mkNodes pkgs.qemu_test;
216218 };
217219 driverInteractive = setupDriverForTest {
218220 inherit testScript enableOCR skipLint passthru;
219221 testName = name;
220222 qemu_pkg = pkgs.qemu;
221221- nodes = nodes pkgs.qemu;
223223+ nodes = mkNodes pkgs.qemu;
222224 interactive = true;
223225 };
224226225225- test =
226226- let
227227- passMeta = drv: drv // lib.optionalAttrs (t ? meta) {
228228- meta = (drv.meta or { }) // t.meta;
229229- };
230230- in passMeta (runTests { inherit driver pos driverInteractive; });
227227+ test = lib.addMetaAttrs meta (runTests { inherit driver pos driverInteractive; });
231228232229 in
233230 test // {
234234- inherit test driver driverInteractive nodes;
231231+ inherit test driver driverInteractive;
232232+ inherit (driver) nodes;
235233 };
236234237235 abortForFunction = functionName: abort ''The ${functionName} function was
+1-1
nixos/modules/installer/tools/tools.nix
···117117 '';
118118 };
119119120120- config = lib.mkIf (!config.system.disableInstallerTools) {
120120+ config = lib.mkIf (config.nix.enable && !config.system.disableInstallerTools) {
121121122122 system.nixos-generate-config.configuration = mkDefault ''
123123 # Edit this configuration file to define what should be installed on
···11+{ config, lib, pkgs, ... }:
22+33+let
44+ inherit (lib)
55+ concatStringsSep
66+ mkEnableOption mkIf mkOption types;
77+88+ cfg = config.services.https-dns-proxy;
99+1010+ providers = {
1111+ cloudflare = {
1212+ ips = [ "1.1.1.1" "1.0.0.1" ];
1313+ url = "https://cloudflare-dns.com/dns-query";
1414+ };
1515+ google = {
1616+ ips = [ "8.8.8.8" "8.8.4.4" ];
1717+ url = "https://dns.google/dns-query";
1818+ };
1919+ quad9 = {
2020+ ips = [ "9.9.9.9" "149.112.112.112" ];
2121+ url = "https://dns.quad9.net/dns-query";
2222+ };
2323+ };
2424+2525+ defaultProvider = "quad9";
2626+2727+ providerCfg =
2828+ let
2929+ isCustom = cfg.provider.kind == "custom";
3030+ in
3131+ lib.concatStringsSep " " [
3232+ "-b"
3333+ (concatStringsSep "," (if isCustom then cfg.provider.ips else providers."${cfg.provider.kind}".ips))
3434+ "-r"
3535+ (if isCustom then cfg.provider.url else providers."${cfg.provider.kind}".url)
3636+ ];
3737+3838+in
3939+{
4040+ meta.maintainers = with lib.maintainers; [ peterhoeg ];
4141+4242+ ###### interface
4343+4444+ options.services.https-dns-proxy = {
4545+ enable = mkEnableOption "https-dns-proxy daemon";
4646+4747+ address = mkOption {
4848+ description = "The address on which to listen";
4949+ type = types.str;
5050+ default = "127.0.0.1";
5151+ };
5252+5353+ port = mkOption {
5454+ description = "The port on which to listen";
5555+ type = types.port;
5656+ default = 5053;
5757+ };
5858+5959+ provider = {
6060+ kind = mkOption {
6161+ description = ''
6262+ The upstream provider to use or custom in case you do not trust any of
6363+ the predefined providers or just want to use your own.
6464+6565+ The default is ${defaultProvider} and there are privacy and security trade-offs
6666+ when using any upstream provider. Please consider that before using any
6767+ of them.
6868+6969+ If you pick a custom provider, you will need to provide the bootstrap
7070+ IP addresses as well as the resolver https URL.
7171+ '';
7272+ type = types.enum ((builtins.attrNames providers) ++ [ "custom" ]);
7373+ default = defaultProvider;
7474+ };
7575+7676+ ips = mkOption {
7777+ description = "The custom provider IPs";
7878+ type = types.listOf types.str;
7979+ };
8080+8181+ url = mkOption {
8282+ description = "The custom provider URL";
8383+ type = types.str;
8484+ };
8585+ };
8686+8787+ preferIPv4 = mkOption {
8888+ description = ''
8989+ https_dns_proxy will by default use IPv6 and fail if it is not available.
9090+ To play it safe, we choose IPv4.
9191+ '';
9292+ type = types.bool;
9393+ default = true;
9494+ };
9595+9696+ extraArgs = mkOption {
9797+ description = "Additional arguments to pass to the process.";
9898+ type = types.listOf types.str;
9999+ default = [ "-v" ];
100100+ };
101101+ };
102102+103103+ ###### implementation
104104+105105+ config = lib.mkIf cfg.enable {
106106+ systemd.services.https-dns-proxy = {
107107+ description = "DNS to DNS over HTTPS (DoH) proxy";
108108+ after = [ "network.target" ];
109109+ wantedBy = [ "multi-user.target" ];
110110+ serviceConfig = rec {
111111+ Type = "exec";
112112+ DynamicUser = true;
113113+ ExecStart = lib.concatStringsSep " " (
114114+ [
115115+ "${pkgs.https-dns-proxy}/bin/https_dns_proxy"
116116+ "-a ${toString cfg.address}"
117117+ "-p ${toString cfg.port}"
118118+ "-l -"
119119+ providerCfg
120120+ ]
121121+ ++ lib.optional cfg.preferIPv4 "-4"
122122+ ++ cfg.extraArgs
123123+ );
124124+ Restart = "on-failure";
125125+ };
126126+ };
127127+ };
128128+}
+77-21
nixos/modules/services/system/earlyoom.nix
···5566 inherit (lib)
77 mkDefault mkEnableOption mkIf mkOption types
88- mkRemovedOptionModule
99- concatStringsSep optional;
88+ mkRemovedOptionModule literalExpression
99+ escapeShellArg concatStringsSep optional optionalString;
10101111in
1212{
···1717 type = types.ints.between 1 100;
1818 default = 10;
1919 description = ''
2020- Minimum of availabe memory (in percent).
2121- If the free memory falls below this threshold and the analog is true for
2222- <option>services.earlyoom.freeSwapThreshold</option>
2323- the killing begins.
2020+ Minimum available memory (in percent).
2121+2222+ If the available memory falls below this threshold (and the analog is true for
2323+ <option>freeSwapThreshold</option>) the killing begins.
2424+ SIGTERM is sent first to the process that uses the most memory; then, if the available
2525+ memory falls below <option>freeMemKillThreshold</option> (and the analog is true for
2626+ <option>freeSwapKillThreshold</option>), SIGKILL is sent.
2727+2828+ See <link xlink:href="https://github.com/rfjakob/earlyoom#command-line-options">README</link> for details.
2929+ '';
3030+ };
3131+3232+ freeMemKillThreshold = mkOption {
3333+ type = types.nullOr (types.ints.between 1 100);
3434+ default = null;
3535+ description = ''
3636+ Minimum available memory (in percent) before sending SIGKILL.
3737+ If unset, this defaults to half of <option>freeMemThreshold</option>.
3838+3939+ See the description of <xref linkend="opt-services.earlyoom.freeMemThreshold"/>.
2440 '';
2541 };
2642···2844 type = types.ints.between 1 100;
2945 default = 10;
3046 description = ''
3131- Minimum of availabe swap space (in percent).
3232- If the available swap space falls below this threshold and the analog
3333- is true for <option>services.earlyoom.freeMemThreshold</option>
3434- the killing begins.
4747+ Minimum free swap space (in percent) before sending SIGTERM.
4848+4949+ See the description of <xref linkend="opt-services.earlyoom.freeMemThreshold"/>.
3550 '';
3651 };
37523838- # TODO: remove or warn after 1.7 (https://github.com/rfjakob/earlyoom/commit/7ebc4554)
3939- ignoreOOMScoreAdjust = mkOption {
4040- type = types.bool;
4141- default = false;
5353+ freeSwapKillThreshold = mkOption {
5454+ type = types.nullOr (types.ints.between 1 100);
5555+ default = null;
4256 description = ''
4343- Ignore oom_score_adjust values of processes.
5757+ Minimum free swap space (in percent) before sending SIGKILL.
5858+ If unset, this defaults to half of <option>freeSwapThreshold</option>.
5959+6060+ See the description of <xref linkend="opt-services.earlyoom.freeMemThreshold"/>.
4461 '';
4562 };
4663···6380 local user to DoS your session by spamming notifications.
64816582 To actually see the notifications in your GUI session, you need to have
6666- <literal>systembus-notify</literal> running as your user which this
6767- option handles.
8383+ <literal>systembus-notify</literal> running as your user, which this
8484+ option handles by enabling <option>services.systembus-notify</option>.
68856986 See <link xlink:href="https://github.com/rfjakob/earlyoom#notifications">README</link> for details.
7087 '';
7188 };
8989+9090+ killHook = mkOption {
9191+ type = types.nullOr types.path;
9292+ default = null;
9393+ example = literalExpression ''
9494+ pkgs.writeShellScript "earlyoom-kill-hook" '''
9595+ echo "Process $EARLYOOM_NAME ($EARLYOOM_PID) was killed" >> /path/to/log
9696+ '''
9797+ '';
9898+ description = ''
9999+ An absolute path to an executable to be run for each process killed.
100100+ Some environment variables are available, see
101101+ <link xlink:href="https://github.com/rfjakob/earlyoom#notifications">README</link> and
102102+ <link xlink:href="https://github.com/rfjakob/earlyoom/blob/master/MANPAGE.md#-n-pathtoscript">the man page</link>
103103+ for details.
104104+ '';
105105+ };
106106+107107+ reportInterval = mkOption {
108108+ type = types.int;
109109+ default = 3600;
110110+ example = 0;
111111+ description = "Interval (in seconds) at which a memory report is printed (set to 0 to disable).";
112112+ };
113113+114114+ extraArgs = mkOption {
115115+ type = types.listOf types.str;
116116+ default = [];
117117+ example = [ "-g" "--prefer '(^|/)(java|chromium)$'" ];
118118+ description = "Extra command-line arguments to be passed to earlyoom.";
119119+ };
72120 };
7312174122 imports = [
···76124 This option is deprecated and ignored by earlyoom since 1.2.
77125 '')
78126 (mkRemovedOptionModule [ "services" "earlyoom" "notificationsCommand" ] ''
7979- This option is deprecated and ignored by earlyoom since 1.6.
127127+ This option was removed in earlyoom 1.6, but was reimplemented in 1.7
128128+ and is available as the new option `services.earlyoom.killHook`.
129129+ '')
130130+ (mkRemovedOptionModule [ "services" "earlyoom" "ignoreOOMScoreAdjust" ] ''
131131+ This option is deprecated and ignored by earlyoom since 1.7.
80132 '')
81133 ];
82134···91143 StandardError = "journal";
92144 ExecStart = concatStringsSep " " ([
93145 "${pkgs.earlyoom}/bin/earlyoom"
9494- "-m ${toString cfg.freeMemThreshold}"
9595- "-s ${toString cfg.freeSwapThreshold}"
146146+ ("-m ${toString cfg.freeMemThreshold}"
147147+ + optionalString (cfg.freeMemKillThreshold != null) ",${toString cfg.freeMemKillThreshold}")
148148+ ("-s ${toString cfg.freeSwapThreshold}"
149149+ + optionalString (cfg.freeSwapKillThreshold != null) ",${toString cfg.freeSwapKillThreshold}")
150150+ "-r ${toString cfg.reportInterval}"
96151 ]
9797- ++ optional cfg.ignoreOOMScoreAdjust "-i"
98152 ++ optional cfg.enableDebugInfo "-d"
99153 ++ optional cfg.enableNotifications "-n"
154154+ ++ optional (cfg.killHook != null) "-N ${escapeShellArg cfg.killHook}"
155155+ ++ cfg.extraArgs
100156 );
101157 };
102158 };
···796796 # allow `system.build.toplevel' to be included. (If we had a direct
797797 # reference to ${regInfo} here, then we would get a cyclic
798798 # dependency.)
799799- boot.postBootCommands =
799799+ boot.postBootCommands = lib.mkIf config.nix.enable
800800 ''
801801 if [[ "$(cat /proc/cmdline)" =~ regInfo=([^ ]*) ]]; then
802802 ${config.nix.package.out}/bin/nix-store --load-db < ''${BASH_REMATCH[1]}
···11{ lib, stdenv, fetchsvn, libxml2, gtk2, curl, pkg-config } :
2233-let
33+stdenv.mkDerivation rec {
44+ pname = "gosmore";
45 version = "31801";
55-in
66-stdenv.mkDerivation {
77- name = "gosmore-r${version}";
86 # the gosmore svn repository does not lock revision numbers of its externals
97 # so we explicitly disable them to avoid breaking the hash
108 # especially as the externals appear to be unused
+2-2
pkgs/applications/misc/lighthouse/default.nix
···33}:
4455stdenv.mkDerivation rec {
66- name = "lighthouse-${date}";
77- date = "2016-07-20";
66+ pname = "lighthouse";
77+ version = "unstable-2016-07-20";
8899 src = fetchFromGitHub {
1010 owner = "emgram769";
···24242525in stdenv.mkDerivation rec {
2626 pname = "signal-desktop";
2727- version = "5.35.0"; # Please backport all updates to the stable channel.
2727+ version = "5.36.0"; # Please backport all updates to the stable channel.
2828 # All releases have a limited lifetime and "expire" 90 days after the release.
2929 # When releases "expire" the application becomes unusable until an update is
3030 # applied. The expiration date for the current release can be extracted with:
···34343535 src = fetchurl {
3636 url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
3737- sha256 = "sha256-2KF2OLq6/vHElgloxn+kgQisJC+HAkpOBfsKfEPW35c=";
3737+ sha256 = "sha256-x1PUEDq/0B1T14mBs2FuKtcGpJHWOIvHAs8hptpzhZk=";
3838 };
39394040 nativeBuildInputs = [
···11{ lib, stdenv, fetchurl, jre, makeWrapper }:
2233-let
33+stdenv.mkDerivation rec {
44+ pname = "bfg-repo-cleaner";
45 version = "1.13.0";
66+57 jarName = "bfg-${version}.jar";
66- mavenUrl = "mirror://maven/com/madgag/bfg/${version}/${jarName}";
77-in
88- stdenv.mkDerivation {
99- inherit version jarName;
1081111- name = "bfg-repo-cleaner-${version}";
99+ src = fetchurl {
1010+ url = "mirror://maven/com/madgag/bfg/${version}/${jarName}";
1111+ sha256 = "1kn84rsvms1v5l1j2xgrk7dc7mnsmxkc6sqd94mnim22vnwvl8mz";
1212+ };
12131313- src = fetchurl {
1414- url = mavenUrl;
1515- sha256 = "1kn84rsvms1v5l1j2xgrk7dc7mnsmxkc6sqd94mnim22vnwvl8mz";
1616- };
1414+ nativeBuildInputs = [ makeWrapper ];
1515+ buildInputs = [ jre ];
17161818- nativeBuildInputs = [ makeWrapper ];
1919- buildInputs = [ jre ];
2020-2121- dontUnpack = true;
1717+ dontUnpack = true;
22182323- installPhase = ''
2424- mkdir -p $out/share/java
2525- mkdir -p $out/bin
2626- cp $src $out/share/java/$jarName
2727- makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main"
2828- '';
1919+ installPhase = ''
2020+ mkdir -p $out/share/java
2121+ mkdir -p $out/bin
2222+ cp $src $out/share/java/$jarName
2323+ makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main"
2424+ '';
29253030- meta = with lib; {
3131- homepage = "https://rtyley.github.io/bfg-repo-cleaner/";
3232- # Descriptions taken with minor modification from the homepage of bfg-repo-cleaner
3333- description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster";
3434- longDescription = ''
3535- The BFG is a simpler, faster alternative to git-filter-branch for
3636- cleansing bad data out of your Git repository history, in particular removing
3737- crazy big files and removing passwords, credentials, and other private data.
2626+ meta = with lib; {
2727+ homepage = "https://rtyley.github.io/bfg-repo-cleaner/";
2828+ # Descriptions taken with minor modification from the homepage of bfg-repo-cleaner
2929+ description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster";
3030+ longDescription = ''
3131+ The BFG is a simpler, faster alternative to git-filter-branch for
3232+ cleansing bad data out of your Git repository history, in particular removing
3333+ crazy big files and removing passwords, credentials, and other private data.
38343939- The git-filter-branch command is enormously powerful and can do things
4040- that the BFG can't - but the BFG is much better for the tasks above, because
4141- it's faster (10-720x), simpler (dedicated to just removing things), and
4242- beautiful (can use Scala instead of bash to script customizations).
4343- '';
4444- license = licenses.gpl3;
4545- maintainers = [ maintainers.changlinli ];
4646- platforms = platforms.unix;
4747- downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}";
4848- };
3535+ The git-filter-branch command is enormously powerful and can do things
3636+ that the BFG can't - but the BFG is much better for the tasks above, because
3737+ it's faster (10-720x), simpler (dedicated to just removing things), and
3838+ beautiful (can use Scala instead of bash to script customizations).
3939+ '';
4040+ license = licenses.gpl3;
4141+ maintainers = [ maintainers.changlinli ];
4242+ platforms = platforms.unix;
4343+ downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}";
4444+ };
49455050- }
4646+}
···5959 export PATH="/run/wrappers/bin:/usr/bin:/usr/sbin:$PATH"
6060 export TZDIR='/etc/zoneinfo'
61616262+ # XDG_DATA_DIRS is used by pressure-vessel (steam proton) and vulkan loaders to find the corresponding icd
6363+ export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}/run/opengl-driver/share:/run/opengl-driver-32/share
6464+6265 # Force compilers and other tools to look in default search paths
6366 unset NIX_ENFORCE_PURITY
6467 export NIX_CC_WRAPPER_TARGET_HOST_${stdenv.cc.suffixSalt}=1
+3
pkgs/build-support/build-fhs-userenv/env.nix
···6060 export PATH="/run/wrappers/bin:/usr/bin:/usr/sbin:$PATH"
6161 export TZDIR='/etc/zoneinfo'
62626363+ # XDG_DATA_DIRS is used by pressure-vessel (steam proton) and vulkan loaders to find the corresponding icd
6464+ export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}/run/opengl-driver/share:/run/opengl-driver-32/share
6565+6366 # Force compilers and other tools to look in default search paths
6467 unset NIX_ENFORCE_PURITY
6568 export NIX_CC_WRAPPER_TARGET_HOST_${stdenv.cc.suffixSalt}=1
···1818 local -r iconName=$3
1919 local -r theme=${4:-hicolor}
20202121- local -ra iconSizes=(16 32 48 128 256 512)
2121+ # Sizes based on archived Apple documentation:
2222+ # https://developer.apple.com/design/human-interface-guidelines/macos/icons-and-images/app-icon#app-icon-sizes
2323+ local -ra iconSizes=(16 32 128 256 512)
2224 local -ra scales=([1]="" [2]="@2")
23252426 # Based loosely on the algorithm at:
···3133 local scaleSuffix=${scales[$scale]}
3234 local exactSize=${iconSize}x${iconSize}${scaleSuffix}
33353434- if [[ $exactSize = '48x48@2' ]]; then
3535- # macOS does not support a 2x scale variant of 48x48 icons
3636- # See: https://en.wikipedia.org/wiki/Apple_Icon_Image_format#Icon_types
3737- echo "unsupported"
3838- return 0
3939- fi
4040-4136 local -a validSizes=(
4237 ${exactSize}
4338 $((iconSize + 1))x$((iconSize + 1))${scaleSuffix}
···5550 else
5651 echo "threshold $icon"
5752 fi
5858- return 0
5353+ elif [[ -a $icon ]]; then
5454+ echo "fallback $icon"
5955 fi
5656+ return 0
6057 done
6158 done
6259 echo "scalable"
···106103 scalableIcon=('-')
107104 fi
108105106106+ # Tri-state variable, NONE means no icons have been found, an empty
107107+ # icns file will be generated, not sure that's necessary because macOS
108108+ # will default to a generic icon if no icon can be found.
109109+ #
110110+ # OTHER means an appropriate icon was found.
111111+ #
112112+ # Any other value is a path to an icon file that isn't scalable or
113113+ # within the threshold. This is used as a fallback in case no better
114114+ # icon can be found and will be scaled as much as
115115+ # necessary to result in appropriate icon sizes.
116116+ local foundIcon=NONE
109117 for iconSize in "${iconSizes[@]}"; do
110118 for scale in "${!scales[@]}"; do
111119 local iconResult=$(findIcon $iconSize $scale)
···117125 fixed)
118126 local density=$((72 * scale))x$((72 * scale))
119127 magick convert -density "$density" -units PixelsPerInch "$icon" "$result"
128128+ foundIcon=OTHER
120129 ;;
121130 threshold)
122131 # Synthesize an icon of the exact size if a scalable icon is available
···124133 if ! synthesizeIcon "${scalableIcon[0]}" "$result" "$iconSize" "$scale"; then
125134 resizeIcon "$icon" "$result" "$iconSize" "$scale"
126135 fi
136136+ foundIcon=OTHER
127137 ;;
128138 scalable)
129139 synthesizeIcon "${scalableIcon[0]}" "$result" "$iconSize" "$scale" || true
140140+ foundIcon=OTHER
141141+ ;;
142142+ fallback)
143143+ # Use the largest size available to scale to
144144+ # appropriate sizes.
145145+ if [[ $foundIcon != OTHER ]]; then
146146+ foundIcon=$icon
147147+ fi
130148 ;;
131149 *)
132150 ;;
133151 esac
134152 done
135153 done
154154+ if [[ $foundIcon != NONE && $foundIcon != OTHER ]]; then
155155+ # Ideally we'd only resize to whatever the closest sizes are,
156156+ # starting from whatever icon sizes are available.
157157+ for iconSize in 16 32 128 256 512; do
158158+ local result=${resultdir}/${iconSize}x${iconSize}.png
159159+ resizeIcon "$foundIcon" "$result" "$iconSize" 1
160160+ done
161161+ fi
136162 echo "$resultdir"
137163 }
138164139165 iconsdir=$(getIcons "$sharePath" "apps/${iconName}" "$theme")
140140- if [[ ! -z "$(ls -1 "$iconsdir/"*)" ]]; then
141141- icnsutil compose "$out/${iconName}.icns" "$iconsdir/"*
166166+ if [[ -n "$(ls -1 "$iconsdir/"*)" ]]; then
167167+ icnsutil compose --toc "$out/${iconName}.icns" "$iconsdir/"*
142168 else
143169 echo "Warning: no icons were found. Creating an empty icon for ${iconName}.icns."
144170 touch "$out/${iconName}.icns"
-1
pkgs/data/documentation/man-pages/default.nix
···2424 meta = with lib; {
2525 description = "Linux development manual pages";
2626 homepage = "https://www.kernel.org/doc/man-pages/";
2727- repositories.git = "https://git.kernel.org/pub/scm/docs/man-pages/man-pages";
2827 license = licenses.gpl2Plus;
2928 platforms = with platforms; unix;
3029 priority = 30; # if a package comes with its own man page, prefer it
···11-WGET_ARGS=( https://download.kde.org/stable/plasma/5.24.0/ -A '*.tar.xz' )
11+WGET_ARGS=( https://download.kde.org/stable/plasma/5.24.3/ -A '*.tar.xz' )
···2525 meta = with lib; {
2626 description = "Allows you (with the right hardware) to control your device with your TV remote control using existing HDMI cabling";
2727 homepage = "http://libcec.pulse-eight.com";
2828- repositories.git = "https://github.com/Pulse-Eight/libcec.git";
2928 license = lib.licenses.gpl2Plus;
3029 platforms = platforms.linux;
3130 maintainers = [ maintainers.titanous ];
-1
pkgs/development/libraries/libcec/platform.nix
···1616 meta = with lib; {
1717 description = "Platform library for libcec and Kodi addons";
1818 homepage = "https://github.com/Pulse-Eight/platform";
1919- repositories.git = "https://github.com/Pulse-Eight/platform.git";
2019 license = lib.licenses.gpl2Plus;
2120 platforms = platforms.all;
2221 maintainers = [ maintainers.titanous ];
···35353636 meta = with lib; {
3737 homepage = "https://libusb.info/";
3838- repositories.git = "https://github.com/libusb/libusb-compat-0.1";
3938 description = "cross-platform user-mode USB device library";
4039 longDescription = ''
4140 libusb is a cross-platform user-mode library that provides access to USB devices.
-1
pkgs/development/libraries/libusb1/default.nix
···39394040 meta = with lib; {
4141 homepage = "https://libusb.info/";
4242- repositories.git = "https://github.com/libusb/libusb";
4342 description = "cross-platform user-mode USB device library";
4443 longDescription = ''
4544 libusb is a cross-platform user-mode library that provides access to USB devices.
-1
pkgs/development/libraries/libvirt/default.nix
···331331332332 meta = {
333333 homepage = "https://libvirt.org/";
334334- repositories.git = "git://libvirt.org/libvirt.git";
335334 description = ''
336335 A toolkit to interact with the virtualization capabilities of recent
337336 versions of Linux (and other OSes)
···24242525 meta = with lib; {
2626 homepage = "https://taglib.org/";
2727- repositories.git = "git://github.com/taglib/taglib.git";
2827 description = "A library for reading and editing audio file metadata";
2928 longDescription = ''
3029 TagLib is a library for reading and editing the meta-data of several
···3434 export USE_SHARED_BROTLI=1
3535 '';
36363737- # Test data is not available, only when using libbortli git checkout
3737+ # Test data is not available, only when using libbrotli git checkout
3838 doCheck = false;
39394040 pythonImportsCheck = [ "brotlicffi" ];
···3838 ];
39394040 meta = with lib; {
4141- homepage = "http://flask.pocoo.org/";
4141+ homepage = "https://flask.palletsprojects.com/";
4242 description = "The Python micro framework for building web applications";
4343 longDescription = ''
4444 Flask is a lightweight WSGI web application framework. It is
···2121 done
2222 '';
23232424+ postPatch = ''
2525+ # Verion is not stored in repo, gets added by a GitHub action after tag is created
2626+ # https://github.com/pdfminer/pdfminer.six/pull/727
2727+ substituteInPlace pdfminer/__init__.py --replace "__VERSION__" ${version}
2828+ '';
2929+2430 checkInputs = [ pytestCheckHook ];
25312632 meta = with lib; {
···34343535 meta = with lib; {
3636 homepage = "https://springlobby.info/";
3737- repositories.git = "git://github.com/springlobby/springlobby.git";
3837 description = "Cross-platform lobby client for the Spring RTS project";
3938 license = licenses.gpl2;
4039 maintainers = with maintainers; [ qknight domenkozar ];
-3
pkgs/games/steam/fhsenv.nix
···228228 export TZ="$new_TZ"
229229 fi
230230 fi
231231-232232- # XDG_DATA_DIRS is used by pressure-vessel and vulkan loaders to find the corresponding icd
233233- export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}/run/opengl-driver/share:/run/opengl-driver-32/share
234231 '' + extraProfile;
235232236233 runScript = writeScript "steam-wrapper.sh" ''
···73737474 meta = with lib; {
7575 homepage = "https://hostap.epitest.fi";
7676- repositories.git = "git://w1.fi/hostap.git";
7776 description = "A user space daemon for access point and authentication servers";
7877 license = licenses.gpl2;
7978 maintainers = with maintainers; [ ninjatrappeur hexa ];
-1
pkgs/os-specific/linux/i7z/default.nix
···4949 meta = with lib; {
5050 description = "A better i7 (and now i3, i5) reporting tool for Linux";
5151 homepage = "https://github.com/DimitryAndric/i7z";
5252- repositories.git = "https://github.com/DimitryAndric/i7z.git";
5352 license = licenses.gpl2;
5453 maintainers = with maintainers; [ bluescreen303 ];
5554 # broken on ARM
+1
pkgs/os-specific/linux/kernel/common-config.nix
···482482 DEFAULT_SECURITY_APPARMOR = yes;
483483484484 RANDOM_TRUST_CPU = whenAtLeast "4.19" yes; # allow RDRAND to seed the RNG
485485+ RANDOM_TRUST_BOOTLOADER = whenAtLeast "5.4" yes; # allow the bootloader to seed the RNG
485486486487 MODULE_SIG = no; # r13y, generates a random key during build and bakes it in
487488 # Depends on MODULE_SIG and only really helps when you sign your modules
+2-2
pkgs/os-specific/linux/kernel/linux-5.10.nix
···33with lib;
4455buildLinux (args // rec {
66- version = "5.10.106";
66+ version = "5.10.107";
7788 # modDirVersion needs to be x.y.z, will automatically add .0 if needed
99 modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
···13131414 src = fetchurl {
1515 url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
1616- sha256 = "0yjrlghcxw3lhd6nc2m4zy4gk536w3a3w6mxdsml690fqz4531n6";
1616+ sha256 = "1snzzhkzdjlj92gqig3sanxlhv0xc0xk2xwjdjr0yds6g43w6ry4";
1717 };
1818} // (args.argsOverride or {}))
+2-2
pkgs/os-specific/linux/kernel/linux-5.15.nix
···33with lib;
4455buildLinux (args // rec {
66- version = "5.15.29";
66+ version = "5.15.30";
7788 # modDirVersion needs to be x.y.z, will automatically add .0 if needed
99 modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
···15151616 src = fetchurl {
1717 url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
1818- sha256 = "0vl7xm4xs59z071wfjna392yada3hg5h6h3dfjaswircc22fc1ar";
1818+ sha256 = "0ckiz985x88x68psg6wazyk7zpv34k8rbzpzyzj0gaph13za4ki5";
1919 };
2020} // (args.argsOverride or { }))
+2-2
pkgs/os-specific/linux/kernel/linux-5.16.nix
···33with lib;
4455buildLinux (args // rec {
66- version = "5.16.15";
66+ version = "5.16.16";
7788 # modDirVersion needs to be x.y.z, will automatically add .0 if needed
99 modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
···13131414 src = fetchurl {
1515 url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
1616- sha256 = "1mi41npkk1inqchm3yp14xmzc5lrp50d7vbpazwxwq5kw04c8c4g";
1616+ sha256 = "13qk6cjnjwgnxj25mphyv08pjf1sqz7bxxrr3fpl8gz3aghdd9yc";
1717 };
1818} // (args.argsOverride or { }))
+2-2
pkgs/os-specific/linux/kernel/linux-5.4.nix
···33with lib;
4455buildLinux (args // rec {
66- version = "5.4.185";
66+ version = "5.4.186";
7788 # modDirVersion needs to be x.y.z, will automatically add .0 if needed
99 modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
···13131414 src = fetchurl {
1515 url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
1616- sha256 = "11rp3x05bq9cs9gwy4x36ynkgl7nb5ss29zi6m7n5ywvczdfjpyi";
1616+ sha256 = "1f9rigm58miq5s98bx7pvylqi9hlzlfnq1nrj4cd8f4arcjcvxv1";
1717 };
1818} // (args.argsOverride or {}))
···11-{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
11+{ lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests
22+ # darwin
33+ , CoreFoundation, IOKit
44+}:
2536buildGoModule rec {
47 pname = "node_exporter";
···16191720 # FIXME: tests fail due to read-only nix store
1821 doCheck = false;
2222+2323+ buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation IOKit ];
2424+ # upstream currently doesn't work with the version of the macOS SDK
2525+ # we're building against in nix-darwin without a patch.
2626+ # this patch has been submitted upstream at https://github.com/prometheus/node_exporter/pull/2327
2727+ # and only needs to be carried until it lands in a new release.
2828+ patches = lib.optionals stdenv.isDarwin [ ./node-exporter/node-exporter-darwin.patch ];
19292030 excludedPackages = [ "docs/node-mixin" ];
2131
···2828 meta = with lib; {
2929 description = "Sets your computer's clock from time servers on the Net";
3030 homepage = "https://chrony.tuxfamily.org/";
3131- repositories.git = "git://git.tuxfamily.org/gitroot/chrony/chrony.git";
3231 license = licenses.gpl2;
3332 platforms = with platforms; linux ++ freebsd ++ openbsd;
3433 maintainers = with maintainers; [ fpletz thoughtpolice ];
···55 version = "0.0.11";
6677 src = fetchgit {
88- url = meta.repositories.git;
88+ url = "https://git.torproject.org/pluggable-transports/obfs4.git";
99 rev = "refs/tags/${pname}proxy-${version}";
1010 sha256 = "sha256-VjJ/Pc1YjNB2iLnN/5CxuaxolcaR1IMWgoESMzOXU/g=";
1111 };
···1717 meta = with lib; {
1818 description = "A pluggable transport proxy";
1919 homepage = "https://www.torproject.org/projects/obfsproxy";
2020- repositories.git = "https://git.torproject.org/pluggable-transports/obfs4.git";
2120 maintainers = with maintainers; [ thoughtpolice ];
2221 };
2322}
-1
pkgs/tools/networking/socat/default.nix
···3838 meta = with lib; {
3939 description = "Utility for bidirectional data transfer between two independent data channels";
4040 homepage = "http://www.dest-unreach.org/socat/";
4141- repositories.git = "git://repo.or.cz/socat.git";
4241 platforms = platforms.unix;
4342 license = with licenses; [ gpl2Only ];
4443 maintainers = with maintainers; [ eelco ];
···11-{ lib, stdenv, fetchurl }:
22-33-stdenv.mkDerivation rec {
44- pname = "gnused";
55- version = "4.2.2";
66-77- src = fetchurl {
88- url = "mirror://gnu/sed/sed-${version}.tar.bz2";
99- sha256 = "f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7";
1010- };
1111-1212- configureFlags = lib.optional stdenv.hostPlatform.isMinGW "ac_cv_func__set_invalid_parameter_handler=no";
1313-1414- outputs = [ "out" "info" ];
1515-1616- meta = {
1717- homepage = "https://www.gnu.org/software/sed/";
1818- description = "GNU sed, a batch stream editor";
1919-2020- longDescription = ''
2121- Sed (stream editor) isn't really a true text editor or text
2222- processor. Instead, it is used to filter text, i.e., it takes
2323- text input and performs some operation (or set of operations) on
2424- it and outputs the modified text. Sed is typically used for
2525- extracting part of a file using pattern matching or substituting
2626- multiple occurrences of a string within a file.
2727- '';
2828-2929- license = lib.licenses.gpl3Plus;
3030-3131- platforms = lib.platforms.all;
3232- maintainers = [ ];
3333- mainProgram = "sed";
3434- };
3535-}
-1
pkgs/tools/typesetting/odpdown/default.nix
···20202121 meta = with lib; {
2222 homepage = "https://github.com/thorstenb/odpdown";
2323- repositories.git = "https://github.com/thorstenb/odpdown.git";
2423 description = "Create nice-looking slides from your favourite text editor";
2524 longDescription = ''
2625 Have a tool like pandoc, latex beamer etc, that you can write (or
+2-1
pkgs/top-level/aliases.nix
···12631263 varnish62 = throw "varnish62 was removed from nixpkgs, because it is unmaintained upstream. Please switch to a different release"; # Added 2021-07-26
12641264 varnish63 = throw "varnish63 was removed from nixpkgs, because it is unmaintained upstream. Please switch to a different release"; # Added 2021-07-26
12651265 varnish65 = throw "varnish65 was removed from nixpkgs, because it is unmaintained upstream. Please switch to a different release"; # Added 2021-09-15
12661266+ varnish70 = throw "varnish70 was removed from nixpkgs, because it was superseded upstream. Please switch to a different release"; # Added 2022-03-17
12661267 vdirsyncerStable = vdirsyncer; # Added 2020-11-08, see https://github.com/NixOS/nixpkgs/issues/103026#issuecomment-723428168
12671268 venus = throw "venus has been removed from nixpkgs, as it's unmaintained"; # Added 2021-02-05
12681269 vimbWrapper = throw "'vimbWrapper' has been renamed to/replaced by 'vimb'"; # Converted to throw 2022-02-22
···14481449 ksshaskpass ksystemlog kteatime ktimer ktorrent ktouch kturtle kwallet-pam
14491450 kwalletmanager kwave kwayland-integration kwin kwrited marble milou minuet
14501451 okular oxygen oxygen-icons5 picmi plasma-browser-integration plasma-desktop
14511451- plasma-integration plasma-nano plasma-nm plasma-pa plasma-phone-components
14521452+ plasma-integration plasma-nano plasma-nm plasma-pa plasma-mobile
14521453 plasma-systemmonitor plasma-thunderbolt plasma-vault plasma-workspace
14531454 plasma-workspace-wallpapers polkit-kde-agent powerdevil qqc2-breeze-style
14541455 sddm-kcm skanlite spectacle systemsettings xdg-desktop-portal-kde yakuake