···524524 </varlistentry>
525525 <varlistentry>
526526 <term>
527527+ If it’s a <emphasis>terminal emulator</emphasis>:
528528+ </term>
529529+ <listitem>
530530+ <para>
531531+ <filename>applications/terminal-emulators</filename> (e.g. <filename>alacritty</filename> or <filename>rxvt</filename> or <filename>termite</filename>)
532532+ </para>
533533+ </listitem>
534534+ </varlistentry>
535535+ <varlistentry>
536536+ <term>
527537 If it’s for <emphasis>video playback / editing</emphasis>:
528538 </term>
529539 <listitem>
+14
doc/languages-frameworks/vim.section.md
···265265266266Finally, there are some plugins that are also packaged in nodePackages because they have Javascript-related build steps, such as running webpack. Those plugins are not listed in `vim-plugin-names` or managed by `update.py` at all, and are included separately in `overrides.nix`. Currently, all these plugins are related to the `coc.nvim` ecosystem of Language Server Protocol integration with vim/neovim.
267267268268+## Updating plugins in nixpkgs
269269+270270+Run the update script with a GitHub API token that has at least `public_repo` access. Running the script without the token is likely to result in rate-limiting (429 errors). For steps on creating an API token, please refer to [GitHub's token documentation](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token).
271271+272272+```sh
273273+GITHUB_API_TOKEN=my_token ./pkgs/misc/vim-plugins/update.py
274274+```
275275+276276+Alternatively, set the number of processes to a lower count to avoid rate-limiting.
277277+278278+```sh
279279+./pkgs/misc/vim-plugins/update.py --proc 1
280280+```
281281+268282## Important repositories
269283270284- [vim-pi](https://bitbucket.org/vimcommunity/vim-pi) is a plugin repository
···5050 </arg>
51515252 <arg>
5353+ <group choice='req'>
5454+ <arg choice='plain'><option>--impure</option></arg>
5555+ </group>
5656+ </arg>
5757+5858+ <arg>
5359 <arg choice='plain'>
5460 <option>--channel</option>
5561 </arg>
···97103 <arg>
98104 <arg choice='plain'>
99105 <option>--show-trace</option>
106106+ </arg>
107107+ </arg>
108108+109109+ <arg>
110110+ <arg choice='plain'>
111111+ <option>--keep-going</option>
100112 </arg>
101113 </arg>
102114···292304 <para>
293305 Causes Nix to print out a stack trace in case of Nix expression
294306 evaluation errors.
307307+ </para>
308308+ </listitem>
309309+ </varlistentry>
310310+ <varlistentry>
311311+ <term>
312312+ <option>--keep-going</option>
313313+ </term>
314314+ <listitem>
315315+ <para>
316316+ Causes Nix to continue building derivations as far as possible
317317+ in the face of failed builds.
295318 </para>
296319 </listitem>
297320 </varlistentry>
+1-1
nixos/doc/manual/release-notes/rl-2009.xml
···16181618 nixpkgs. It was a work in progress to package the
16191619 <link xlink:href="https://www.deepin.org/en/dde/">Deepin Desktop Environment (DDE)</link>,
16201620 including libraries, tools and applications, and it was still
16211621- missing a service to lauch the desktop environment. It has shown
16211621+ missing a service to launch the desktop environment. It has shown
16221622 to no longer be a feasible goal due to reasons discussed in
16231623 <link xlink:href="https://github.com/NixOS/nixpkgs/issues/94870">issue #94870</link>.
16241624 The package <literal>netease-cloud-music</literal> has also been
+8
nixos/doc/manual/release-notes/rl-2103.xml
···135135 to <package>nextcloud20</package>.
136136 </para>
137137 </listitem>
138138+ <listitem>
139139+ <para>
140140+ NixOS now emits a deprecation warning if systemd's <literal>StartLimitInterval</literal> setting is used in a <literal>serviceConfig</literal> section instead of in a <literal>unitConfig</literal>; that setting is deprecated and now undocumented for the service section by systemd upstream, but still effective and somewhat buggy there, which can be confusing. See <link xlink:href="https://github.com/NixOS/nixpkgs/issues/45785">#45785</link> for details.
141141+ </para>
142142+ <para>
143143+ All services should use <xref linkend="opt-systemd.services._name_.startLimitIntervalSec" /> or <literal>StartLimitIntervalSec</literal> in <xref linkend="opt-systemd.services._name_.unitConfig" /> instead.
144144+ </para>
145145+ </listitem>
138146 </itemizedlist>
139147 </section>
140148</section>
+15-1
nixos/lib/make-disk-image.nix
···2828 # partition of reasonable size is created in addition to the root partition.
2929 # For "legacy", the msdos partition table is used and a single large root
3030 # partition is created.
3131+ # For "legacy+gpt", the GPT partition table is used, a 1MiB no-fs partition for
3232+ # use by the bootloader is created, and a single large root partition is
3333+ # created.
3134 # For "hybrid", the GPT partition table is used and a mandatory ESP
3235 # partition of reasonable size is created in addition to the root partition.
3336 # Also a legacy MBR will be present.
···5457 format ? "raw"
5558}:
56595757-assert partitionTableType == "legacy" || partitionTableType == "efi" || partitionTableType == "hybrid" || partitionTableType == "none";
6060+assert partitionTableType == "legacy" || partitionTableType == "legacy+gpt" || partitionTableType == "efi" || partitionTableType == "hybrid" || partitionTableType == "none";
5861# We use -E offset=X below, which is only supported by e2fsprogs
5962assert partitionTableType != "none" -> fsType == "ext4";
6063···75787679 rootPartition = { # switch-case
7780 legacy = "1";
8181+ "legacy+gpt" = "2";
7882 efi = "2";
7983 hybrid = "3";
8084 }.${partitionTableType};
···8488 parted --script $diskImage -- \
8589 mklabel msdos \
8690 mkpart primary ext4 1MiB -1
9191+ '';
9292+ "legacy+gpt" = ''
9393+ parted --script $diskImage -- \
9494+ mklabel gpt \
9595+ mkpart no-fs 1MB 2MB \
9696+ set 1 bios_grub on \
9797+ align-check optimal 1 \
9898+ mkpart primary ext4 2MB -1 \
9999+ align-check optimal 2 \
100100+ print
87101 '';
88102 efi = ''
89103 parted --script $diskImage -- \
+1-1
nixos/maintainers/scripts/ec2/amazon-image.nix
···5757 inherit (cfg) contents format name;
5858 pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
5959 partitionTableType = if config.ec2.efi then "efi"
6060- else if config.ec2.hvm then "legacy"
6060+ else if config.ec2.hvm then "legacy+gpt"
6161 else "none";
6262 diskSize = cfg.sizeMB;
6363 fsType = "ext4";
+31-23
nixos/maintainers/scripts/ec2/create-amis.sh
···11#!/usr/bin/env nix-shell
22#!nix-shell -p awscli -p jq -p qemu -i bash
33+# shellcheck shell=bash
3445# Uploads and registers NixOS images built from the
56# <nixos/release.nix> amazonImage attribute. Images are uploaded and
67# registered via a home region, and then copied to other regions.
7888-# The home region requires an s3 bucket, and a "vmimport" IAM role
99-# with access to the S3 bucket. Configuration of the vmimport role is
1010-# documented in
99+# The home region requires an s3 bucket, and an IAM role named "vmimport"
1010+# (by default) with access to the S3 bucket. The name can be
1111+# configured with the "service_role_name" variable. Configuration of the
1212+# vmimport role is documented in
1113# https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html
12141315# set -x
···1719state_dir=$HOME/amis/ec2-images
1820home_region=eu-west-1
1921bucket=nixos-amis
2222+service_role_name=vmimport
20232124regions=(eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1
2225 us-east-1 us-east-2 us-west-1 us-west-2
···64676568# Derived attributes
66696767-image_logical_gigabytes=$((($image_logical_bytes-1)/1024/1024/1024+1)) # Round to the next GB
7070+image_logical_gigabytes=$(((image_logical_bytes-1)/1024/1024/1024+1)) # Round to the next GB
68716972case "$image_system" in
7073 aarch64-linux)
···100103 local type=$2
101104 local val=$3
102105103103- mkdir -p $state_dir
106106+ mkdir -p "$state_dir"
104107 echo "$val" > "$state_dir/$state_key.$type"
105108}
106109···110113 local state snapshot_id
111114 log "Waiting for import task $task_id to be completed"
112115 while true; do
113113- read state progress snapshot_id < <(
114114- aws ec2 describe-import-snapshot-tasks --region $region --import-task-ids "$task_id" | \
116116+ read -r state progress snapshot_id < <(
117117+ aws ec2 describe-import-snapshot-tasks --region "$region" --import-task-ids "$task_id" | \
115118 jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.Progress) \(.SnapshotId)"'
116119 )
117120 log " ... state=$state progress=$progress snapshot_id=$snapshot_id"
···125128 ;;
126129 *)
127130 log "Unexpected snapshot import state: '${state}'"
131131+ log "Full response: "
132132+ aws ec2 describe-import-snapshot-tasks --region "$region" --import-task-ids "$task_id" >&2
128133 exit 1
129134 ;;
130135 esac
···138143 log "Waiting for image $ami_id to be available"
139144140145 while true; do
141141- read state < <(
142142- aws ec2 describe-images --image-ids "$ami_id" --region $region | \
146146+ read -r state < <(
147147+ aws ec2 describe-images --image-ids "$ami_id" --region "$region" | \
143148 jq -r ".Images[].State"
144149 )
145150 log " ... state=$state"
···163168 local region=$1
164169 local ami_id=$2
165170166166- wait_for_image $region "$ami_id"
171171+ wait_for_image "$region" "$ami_id"
167172168173 log "Making image $ami_id public"
169174···177182 local aws_path=${image_file#/}
178183179184 local state_key="$region.$image_label.$image_system"
180180- local task_id=$(read_state "$state_key" task_id)
181181- local snapshot_id=$(read_state "$state_key" snapshot_id)
182182- local ami_id=$(read_state "$state_key" ami_id)
185185+ local task_id
186186+ task_id=$(read_state "$state_key" task_id)
187187+ local snapshot_id
188188+ snapshot_id=$(read_state "$state_key" snapshot_id)
189189+ local ami_id
190190+ ami_id=$(read_state "$state_key" ami_id)
183191184192 if [ -z "$task_id" ]; then
185193 log "Checking for image on S3"
186194 if ! aws s3 ls --region "$region" "s3://${bucket}/${aws_path}" >&2; then
187195 log "Image missing from aws, uploading"
188188- aws s3 cp --region $region "$image_file" "s3://${bucket}/${aws_path}" >&2
196196+ aws s3 cp --region "$region" "$image_file" "s3://${bucket}/${aws_path}" >&2
189197 fi
190198191199 log "Importing image from S3 path s3://$bucket/$aws_path"
192200193193- task_id=$(aws ec2 import-snapshot --disk-container "{
201201+ task_id=$(aws ec2 import-snapshot --role-name "$service_role_name" --disk-container "{
194202 \"Description\": \"nixos-image-${image_label}-${image_system}\",
195203 \"Format\": \"vhd\",
196204 \"UserBucket\": {
197205 \"S3Bucket\": \"$bucket\",
198206 \"S3Key\": \"$aws_path\"
199207 }
200200- }" --region $region | jq -r '.ImportTaskId')
208208+ }" --region "$region" | jq -r '.ImportTaskId')
201209202210 write_state "$state_key" task_id "$task_id"
203211 fi
···221229 --virtualization-type hvm
222230 )
223231224224- block_device_mappings+=(DeviceName=/dev/sdb,VirtualName=ephemeral0)
225225- block_device_mappings+=(DeviceName=/dev/sdc,VirtualName=ephemeral1)
226226- block_device_mappings+=(DeviceName=/dev/sdd,VirtualName=ephemeral2)
227227- block_device_mappings+=(DeviceName=/dev/sde,VirtualName=ephemeral3)
232232+ block_device_mappings+=("DeviceName=/dev/sdb,VirtualName=ephemeral0")
233233+ block_device_mappings+=("DeviceName=/dev/sdc,VirtualName=ephemeral1")
234234+ block_device_mappings+=("DeviceName=/dev/sdd,VirtualName=ephemeral2")
235235+ block_device_mappings+=("DeviceName=/dev/sde,VirtualName=ephemeral3")
228236229237 ami_id=$(
230238 aws ec2 register-image \
231239 --name "$image_name" \
232240 --description "$image_description" \
233233- --region $region \
241241+ --region "$region" \
234242 --architecture $amazon_arch \
235243 --block-device-mappings "${block_device_mappings[@]}" \
236244 "${extra_flags[@]}" \
···240248 write_state "$state_key" ami_id "$ami_id"
241249 fi
242250243243- make_image_public $region "$ami_id"
251251+ make_image_public "$region" "$ami_id"
244252245253 echo "$ami_id"
246254}
···268276 write_state "$state_key" ami_id "$ami_id"
269277 fi
270278271271- make_image_public $region "$ami_id"
279279+ make_image_public "$region" "$ami_id"
272280273281 echo "$ami_id"
274282}
···6969 type = types.lines;
7070 default = "";
7171 description = ''
7272- Defines how users authenticate themselves to the server. By
7373- default, "trust" access to local users will always be granted
7474- along with any other custom options. If you do not want this,
7575- set this option using "lib.mkForce" to override this
7676- behaviour.
7272+ Defines how users authenticate themselves to the server. See the
7373+ <link xlink:href="https://www.postgresql.org/docs/current/auth-pg-hba-conf.html">
7474+ PostgreSQL documentation for pg_hba.conf</link>
7575+ for details on the expected format of this option. By default,
7676+ peer based authentication will be used for users connecting
7777+ via the Unix socket, and md5 password authentication will be
7878+ used for users connecting via TCP. Any added rules will be
7979+ inserted above the default rules. If you'd like to replace the
8080+ default rules entirely, you can use <function>lib.mkForce</function> in your
8181+ module.
7782 '';
7883 };
7984
···151151 description = "LCDproc - client";
152152 after = [ "lcdd.service" ];
153153 wantedBy = [ "lcd.target" ];
154154+ # Allow restarting for eternity
155155+ startLimitIntervalSec = lib.mkIf cfg.client.restartForever 0;
154156 serviceConfig = serviceCfg // {
155157 ExecStart = "${pkg}/bin/lcdproc -f -c ${clientCfg}";
156158 # If the server is being restarted at the same time, the client will
157159 # fail as it cannot connect, so space it out a bit.
158160 RestartSec = "5";
159159- # Allow restarting for eternity
160160- StartLimitIntervalSec = lib.mkIf cfg.client.restartForever "0";
161161- StartLimitBurst = lib.mkIf cfg.client.restartForever "0";
162161 };
163162 };
164163 };
+44-2
nixos/modules/services/hardware/undervolt.nix
···33with lib;
44let
55 cfg = config.services.undervolt;
66- cliArgs = lib.cli.toGNUCommandLineShell {} {
66+77+ mkPLimit = limit: window:
88+ if (isNull limit && isNull window) then null
99+ else assert asserts.assertMsg (!isNull limit && !isNull window) "Both power limit and window must be set";
1010+ "${toString limit} ${toString window}";
1111+ cliArgs = lib.cli.toGNUCommandLine {} {
712 inherit (cfg)
813 verbose
914 temp
···21262227 temp-bat = cfg.tempBat;
2328 temp-ac = cfg.tempAc;
2929+3030+ power-limit-long = mkPLimit cfg.p1.limit cfg.p1.window;
3131+ power-limit-short = mkPLimit cfg.p2.limit cfg.p2.window;
2432 };
2533in
2634{
···104112 '';
105113 };
106114115115+ p1.limit = mkOption {
116116+ type = with types; nullOr int;
117117+ default = null;
118118+ description = ''
119119+ The P1 Power Limit in Watts.
120120+ Both limit and window must be set.
121121+ '';
122122+ };
123123+ p1.window = mkOption {
124124+ type = with types; nullOr (oneOf [ float int ]);
125125+ default = null;
126126+ description = ''
127127+ The P1 Time Window in seconds.
128128+ Both limit and window must be set.
129129+ '';
130130+ };
131131+132132+ p2.limit = mkOption {
133133+ type = with types; nullOr int;
134134+ default = null;
135135+ description = ''
136136+ The P2 Power Limit in Watts.
137137+ Both limit and window must be set.
138138+ '';
139139+ };
140140+ p2.window = mkOption {
141141+ type = with types; nullOr (oneOf [ float int ]);
142142+ default = null;
143143+ description = ''
144144+ The P2 Time Window in seconds.
145145+ Both limit and window must be set.
146146+ '';
147147+ };
148148+107149 useTimer = mkOption {
108150 type = types.bool;
109151 default = false;
···133175 serviceConfig = {
134176 Type = "oneshot";
135177 Restart = "no";
136136- ExecStart = "${pkgs.undervolt}/bin/undervolt ${cliArgs}";
178178+ ExecStart = "${pkgs.undervolt}/bin/undervolt ${toString cliArgs}";
137179 };
138180 };
139181
···210210 '';
211211 };
212212213213+ startLimitBurst = mkOption {
214214+ type = types.int;
215215+ description = ''
216216+ Configure unit start rate limiting. Units which are started
217217+ more than startLimitBurst times within an interval time
218218+ interval are not permitted to start any more.
219219+ '';
220220+ };
221221+213222 startLimitIntervalSec = mkOption {
214223 type = types.int;
215224 description = ''
216225 Configure unit start rate limiting. Units which are started
217217- more than burst times within an interval time interval are
218218- not permitted to start any more.
226226+ more than startLimitBurst times within an interval time
227227+ interval are not permitted to start any more.
219228 '';
220229 };
221230···245254 serviceConfig = mkOption {
246255 default = {};
247256 example =
248248- { StartLimitInterval = 10;
249249- RestartSec = 5;
257257+ { RestartSec = 5;
250258 };
251259 type = types.addCheck (types.attrsOf unitOption) checkService;
252260 description = ''
+21-8
nixos/modules/system/boot/systemd.nix
···243243 OnFailure = toString config.onFailure; }
244244 // optionalAttrs (options.startLimitIntervalSec.isDefined) {
245245 StartLimitIntervalSec = toString config.startLimitIntervalSec;
246246+ } // optionalAttrs (options.startLimitBurst.isDefined) {
247247+ StartLimitBurst = toString config.startLimitBurst;
246248 };
247249 };
248250 };
···884886885887 config = {
886888887887- warnings = concatLists (mapAttrsToList (name: service:
888888- let
889889- type = service.serviceConfig.Type or "";
890890- restart = service.serviceConfig.Restart or "no";
891891- in optional
892892- (type == "oneshot" && (restart == "always" || restart == "on-success"))
893893- "Service '${name}.service' with 'Type=oneshot' cannot have 'Restart=always' or 'Restart=on-success'")
894894- cfg.services);
889889+ warnings = concatLists (
890890+ mapAttrsToList
891891+ (name: service:
892892+ let
893893+ type = service.serviceConfig.Type or "";
894894+ restart = service.serviceConfig.Restart or "no";
895895+ hasDeprecated = builtins.hasAttr "StartLimitInterval" service.serviceConfig;
896896+ in
897897+ concatLists [
898898+ (optional (type == "oneshot" && (restart == "always" || restart == "on-success"))
899899+ "Service '${name}.service' with 'Type=oneshot' cannot have 'Restart=always' or 'Restart=on-success'"
900900+ )
901901+ (optional hasDeprecated
902902+ "Service '${name}.service' uses the attribute 'StartLimitInterval' in the Service section, which is deprecated. See https://github.com/NixOS/nixpkgs/issues/45786."
903903+ )
904904+ ]
905905+ )
906906+ cfg.services
907907+ );
895908896909 system.build.units = cfg.units;
897910
+1-1
nixos/modules/virtualisation/amazon-image.nix
···4848 ];
4949 boot.initrd.kernelModules = [ "xen-blkfront" "xen-netfront" ];
5050 boot.initrd.availableKernelModules = [ "ixgbevf" "ena" "nvme" ];
5151- boot.kernelParams = mkIf cfg.hvm [ "console=ttyS0" ];
5151+ boot.kernelParams = mkIf cfg.hvm [ "console=ttyS0" "random.trust_cpu=on" ];
52525353 # Prevent the nouveau kernel module from being loaded, as it
5454 # interferes with the nvidia/nvidia-uvm modules needed for CUDA.
+85-6
nixos/tests/firefox.nix
···1111 environment.systemPackages =
1212 (if esr then [ pkgs.firefox-esr ] else [ pkgs.firefox ])
1313 ++ [ pkgs.xdotool ];
1414+1515+ # Need some more memory to record audio.
1616+ virtualisation.memorySize = "500";
1717+1818+ # Create a virtual sound device, with mixing
1919+ # and all, for recording audio.
2020+ boot.kernelModules = [ "snd-aloop" ];
2121+ sound.enable = true;
2222+ sound.extraConfig = ''
2323+ pcm.!default {
2424+ type plug
2525+ slave.pcm pcm.dmixer
2626+ }
2727+ pcm.dmixer {
2828+ type dmix
2929+ ipc_key 1
3030+ slave {
3131+ pcm "hw:Loopback,0,0"
3232+ rate 48000
3333+ periods 128
3434+ period_time 0
3535+ period_size 1024
3636+ buffer_size 8192
3737+ }
3838+ }
3939+ pcm.recorder {
4040+ type hw
4141+ card "Loopback"
4242+ device 1
4343+ subdevice 0
4444+ }
4545+ '';
4646+4747+ systemd.services.audio-recorder = {
4848+ description = "Record NixOS test audio to /tmp/record.wav";
4949+ script = "${pkgs.alsaUtils}/bin/arecord -D recorder -f S16_LE -r48000 /tmp/record.wav";
5050+ };
5151+1452 };
15531654 testScript = ''
5555+ from contextlib import contextmanager
5656+5757+5858+ @contextmanager
5959+ def audio_recording(machine: Machine) -> None:
6060+ """
6161+ Perform actions while recording the
6262+ machine audio output.
6363+ """
6464+ machine.systemctl("start audio-recorder")
6565+ yield
6666+ machine.systemctl("stop audio-recorder")
6767+6868+6969+ def wait_for_sound(machine: Machine) -> None:
7070+ """
7171+ Wait until any sound has been emitted.
7272+ """
7373+ machine.wait_for_file("/tmp/record.wav")
7474+ while True:
7575+ # Get at most 2M of the recording
7676+ machine.execute("tail -c 2M /tmp/record.wav > /tmp/last")
7777+ # Get the exact size
7878+ size = int(machine.succeed("stat -c '%s' /tmp/last").strip())
7979+ # Compare it against /dev/zero using `cmp` (skipping 50B of WAVE header).
8080+ # If some non-NULL bytes are found it returns 1.
8181+ status, output = machine.execute(
8282+ f"cmp -i 50 -n {size - 50} /tmp/last /dev/zero 2>&1"
8383+ )
8484+ if status == 1:
8585+ break
8686+ machine.sleep(2)
8787+8888+1789 machine.wait_for_x()
18901919- with subtest("wait until Firefox has finished loading the Valgrind docs page"):
9191+ with subtest("Wait until Firefox has finished loading the Valgrind docs page"):
2092 machine.execute(
2193 "xterm -e 'firefox file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' &"
2294 )
2395 machine.wait_for_window("Valgrind")
2496 machine.sleep(40)
25979898+ with subtest("Check whether Firefox can play sound"):
9999+ with audio_recording(machine):
100100+ machine.succeed(
101101+ "firefox file://${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/phone-incoming-call.oga &"
102102+ )
103103+ wait_for_sound(machine)
104104+ machine.copy_from_vm("/tmp/record.wav")
105105+106106+ with subtest("Close sound test tab"):
107107+ machine.execute("xdotool key ctrl+w")
108108+26109 with subtest("Close default browser prompt"):
27110 machine.execute("xdotool key space")
281112929- with subtest("Hide default browser window"):
3030- machine.sleep(2)
3131- machine.execute("xdotool key F12")
3232-3333- with subtest("wait until Firefox draws the developer tool panel"):
112112+ with subtest("Wait until Firefox draws the developer tool panel"):
34113 machine.sleep(10)
35114 machine.succeed("xwininfo -root -tree | grep Valgrind")
36115 machine.screenshot("screen")
···150150 description = "A freeware web browser developed by Google";
151151 homepage = "https://www.google.com/chrome/browser/";
152152 license = licenses.unfree;
153153- maintainers = [ maintainers.msteen ];
153153+ maintainers = with maintainers; [ primeos msteen ];
154154+ # Note from primeos: By updating Chromium I also update Google Chrome and
155155+ # will try to merge PRs and respond to issues but I'm not actually using
156156+ # Google Chrome. msteen is the actual user/maintainer.
154157 platforms = [ "x86_64-linux" ];
155158 };
156159}
···99, buildGoPackage
1010, git
1111, runc
1212+, kmod
1213, libseccomp
1314, pkgconfig
1415, ethtool
···226227 # https://github.com/kubernetes/kubernetes/issues/26093#issuecomment-237202494
227228 # Note the list in that issue is stale and some aren't relevant for k3s.
228229 k3sRuntimeDeps = [
230230+ kmod
229231 socat
230232 iptables
231233 iproute
···11-From b23b7dab1d540b0710fcb9ded1c6256a49844906 Mon Sep 17 00:00:00 2001
22-From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
33-Date: Wed, 20 Aug 2014 22:22:00 +0200
44-Subject: [PATCH] Fix wrong "isProcess" logic
55-66-Stopmotion wrongly thinks that uvccapture should be run as a daemon,
77-even though configuration for uvccapture has no "daemon-like" command
88-line to be run (according to "preferences"). The result is an error
99-popup instead of video/image grabbing.
1010-1111-This brings back the "isProcess" logic that was in stopmotion v0.7.2,
1212-because it seems to work, while the current logic (v0.8.0) seems to
1313-fail.
1414----
1515- src/presentation/frontends/qtfrontend/frameview.cpp | 2 +-
1616- 1 file changed, 1 insertion(+), 1 deletion(-)
1717-1818-diff --git a/src/presentation/frontends/qtfrontend/frameview.cpp b/src/presentation/frontends/qtfrontend/frameview.cpp
1919-index e44dca7..d2c41fd 100644
2020---- a/src/presentation/frontends/qtfrontend/frameview.cpp
2121-+++ b/src/presentation/frontends/qtfrontend/frameview.cpp
2222-@@ -270,7 +270,7 @@ bool FrameView::on() {
2323- Preference device(QString("device%1")
2424- .arg(activeDev).toLatin1().constData(), "");
2525- QString pre = QString(prepoll.get()).replace("$VIDEODEVICE", device.get());
2626-- bool isProcess = startDaemon.get();
2727-+ bool isProcess = (strcmp(startDaemon.get(), "") == 0) ? false : true;
2828-2929- bool isCameraReady = true;
3030- this->grabber = new CommandLineGrabber(capturedFile.path(), isProcess);
3131---
3232-2.0.2
3333-
···7777 done
7878 fi
79798080- auto_mounts=""
8080+ declare -a auto_mounts
8181 # loop through all directories in the root
8282 for dir in /*; do
8383 # if it is a directory and it is not in the blacklist
8484 if [[ -d "$dir" ]] && grep -v "$dir" <<< "$blacklist" >/dev/null; then
8585 # add it to the mount list
8686- auto_mounts="$auto_mounts --bind $dir $dir"
8686+ auto_mounts+=(--bind "$dir" "$dir")
8787 fi
8888 done
8989···9797 --ro-bind /nix /nix \
9898 ${etcBindFlags} \
9999 $ro_mounts \
100100- $auto_mounts \
100100+ "''${auto_mounts[@]}" \
101101 ${init runScript}/bin/${name}-init ${initArgs}
102102 '';
103103
···11-{ pkgs, lib }:
11+{ pkgs, lib, gawk, gnused, gixy }:
2233with lib;
44rec {
···219219 writeNginxConfig = name: text: pkgs.runCommandLocal name {
220220 inherit text;
221221 passAsFile = [ "text" ];
222222+ nativeBuildInputs = [ gawk gnused gixy ];
222223 } /* sh */ ''
223224 # nginx-config-formatter has an error - https://github.com/1connect/nginx-config-formatter/issues/16
224224- ${pkgs.gawk}/bin/awk -f ${awkFormatNginx} "$textPath" | ${pkgs.gnused}/bin/sed '/^\s*$/d' > $out
225225- ${pkgs.gixy}/bin/gixy $out
225225+ awk -f ${awkFormatNginx} "$textPath" | sed '/^\s*$/d' > $out
226226+ gixy $out
226227 '';
227228228229 # writePerl takes a name an attributeset with libraries and some perl sourcecode and
+86-66
pkgs/common-updater/scripts/mark-broken
···11#!/usr/bin/env bash
22-set -e
22+33+# This script is meant to be used to mark failing hydra builds as broken in the meta attrs
44+# To use the script, you should pass the list of failing attrs as arguments to the script.
55+#
66+# Example: `cat failing-attrs | xargs ./pkgs/common-update/scripts/mark-broken`
77+#
88+# Generating a list of failing attrs: (this should be improved at a later date)
99+# - Go to the most recent hydra evaluation with all builds completed
1010+# - Select the "builds still failing" tab
1111+# - Highlight and select all packages, should be prefixed with `nixpkgs.`
1212+# - Use regex and editor foo to leave only the attr names
1313+# - Use the above example command to then execute the script
1414+#
1515+# OTHER NOTES:
1616+# - The `denyFileList` and `denyAttrList` will likely need to be updated slightly
1717+# to align with the conventions used in nixpkgs at execution time
1818+# - Any attrs which failed for any reason will be written to `failed-marks.txt`.
1919+# Those attrs will likely need manual attention as disablement will likely be conditional.
320421scriptName=mark-broken # do not use the .wrapped name
52266-die() {
77- echo "$scriptName: error: $1" >&2
88- exit 1
2323+failMark() {
2424+ local attr=$1
2525+ shift 1
2626+2727+ echo "$attr: $@" >&2
2828+ echo $attr >> failed-marks.txt
929}
10301131usage() {
1212- echo "Usage: $scriptName <attr> [--new-value=<new-value>]"
3232+ echo "Usage: $scriptName <attrs>"
1333}
14341515-args=()
1616-1717-for arg in "$@"; do
1818- case $arg in
1919- --new-value=*)
2020- newValue="${arg#*=}"
2121- ;;
2222- --help)
2323- usage
2424- exit 0
2525- ;;
2626- --*)
2727- echo "$scriptName: Unknown argument: $arg"
2828- usage
2929- exit 1
3030- ;;
3131- *)
3232- args["${#args[*]}"]=$arg
3333- ;;
3434- esac
3535-done
3636-3737-attr=${args[0]}
3838-3939-if (( "${#args[*]}" < 1 )); then
3535+if (( "${#@}" < 1 )); then
4036 echo "$scriptName: Too few arguments"
4137 usage
4238 exit 1
4339fi
44404545-if (( "${#args[*]}" > 1 )); then
4646- echo "$scriptName: Too many arguments"
4747- usage
4848- exit 1
4949-fi
4141+# in case we resolve to an auto-generated file, just skip these entries
4242+denyFileList=(
4343+ node-packages.nix # node, it will mark all node packages as broken
4444+ generic-builder.nix # haskell, it will mark all haskell packages as broken
4545+)
50465151-if [ -z $newValue ]; then
5252- newValue="true"
5353-fi
4747+# ignore older versions of parameterized packages sets, these likely need
4848+# to be conditionally disabled
4949+denyAttrList=(
5050+ python27Packages
5151+ python37Packages
5252+ libsForQt512
5353+ linuxPackages_
5454+ rubyPackages_
5555+)
54565555-nixFile=$(nix-instantiate --eval --json -E "with import ./. {}; (builtins.unsafeGetAttrPos \"description\" $attr.meta).file" | jq -r .)
5656-if [[ ! -f "$nixFile" ]]; then
5757- die "Couldn't evaluate 'builtins.unsafeGetAttrPos \"description\" $attr.meta' to locate the .nix file!"
5858-fi
5757+function attemptToMarkBroken() {
5858+ local attr=$1
59596060-# Insert broken attribute
6161-sed -i.bak "$nixFile" -r \
6262- -e "/^\s*broken\s*=.*$/d" \
6363- -e "s/(\s*)meta\s*=.*\{/&\n\1 broken = $newValue;/"
6060+ # skip likely to be noisy attrs
6161+ for badAttr in ${denyAttrList[@]};do
6262+ if [[ $attr =~ $badAttr ]]; then
6363+ failMark $attr "attr contained $badAttr, skipped."
6464+ return
6565+ fi
6666+ done
64676565-if cmp -s "$nixFile" "$nixFile.bak"; then
6666- mv "$nixFile.bak" "$nixFile"
6767- die "Failed to mark the package as broken! Does it have a meta attribute?"
6868-fi
6868+ nixFile=$(nix-instantiate --eval --json -E "with import ./. {}; (builtins.unsafeGetAttrPos \"description\" $attr.meta).file" 2>/dev/null | jq -r .)
6969+ if [[ ! -f "$nixFile" ]]; then
7070+ failMark $attr "Couldn't locate correct file"
7171+ return
7272+ fi
69737070-if [[ "$newValue" == "true" ]]; then
7171- # broken should evaluate to true in any case now
7272- markedSuccessfully=$(nix-instantiate --eval -E "with import ./. {}; $attr.meta.broken" || true)
7373- if [[ ! "$markedSuccessfully" == "true" ]]; then
7474- mv "$nixFile.bak" "$nixFile"
7575- die "Couldn't verify the broken attribute to be set correctly, restoring backup!"
7676- fi
7777-else
7878- # we can not check if broken evaluates to the correct value, but we can check that it does evaluate
7979- if ! nix-instantiate --eval -E "with import ./. {}; $attr.meta.broken" >/dev/null; then
8080- mv "$nixFile.bak" "$nixFile"
8181- die "Couldn't verify the broken attribute to be set correctly, restoring backup!"
8282- fi
8383-fi
7474+ # skip files which are auto-generated
7575+ for filename in ${denyFileList[@]};do
7676+ if [[ "$filename" == $(basename $nixFile) ]]; then
7777+ failMark $attr "filename matched $filename, skipped."
7878+ return
7979+ fi
8080+ done
8181+8282+ # Insert broken attribute
8383+ sed -i.bak "$nixFile" -r \
8484+ -e "/^\s*broken\s*=.*$/d" \
8585+ -e "s/(\s*)meta\s*=.*\{/&\n\1 broken = true;/"
84868585-rm -f "$nixFile.bak"
8686-rm -f "$attr.fetchlog"
8787+ if cmp -s "$nixFile" "$nixFile.bak"; then
8888+ mv "$nixFile.bak" "$nixFile"
8989+ failMark $attr "Does it have a meta attribute?"
9090+ return
9191+ fi
9292+9393+ # broken should evaluate to true in any case now
9494+ markedSuccessfully=$(nix-instantiate --eval -E "with import ./. {}; $attr.meta.broken")
9595+ if [[ "$markedSuccessfully" != "true" ]]; then
9696+ mv "$nixFile.bak" "$nixFile"
9797+ failMark $attr "$attr.meta.broken doesn't evaluate to true."
9898+ return
9999+ fi
100100+101101+ rm -f "$nixFile.bak"
102102+}
103103+104104+for attr in $@; do
105105+ attemptToMarkBroken $attr
106106+done
···11{ fetchFromGitHub, gperf, openssl, readline, zlib, cmake, stdenv }:
2233stdenv.mkDerivation rec {
44- version = "1.6.0";
44+ version = "unstable-2020-10-25";
55 pname = "tdlib";
6677 src = fetchFromGitHub {
88 owner = "tdlib";
99 repo = "td";
1010- rev = "v${version}";
1111- sha256 = "0zlzpl6fgszg18kwycyyyrnkm255dvc6fkq0b0y32m5wvwwl36cv";
1010+1111+ # At version 1.6.0, this line was `rev = "v${version}". Version 1.6.9 (here called `unstable-2020-10-25`) uses an
1212+ # explicit revision because 1.6.9 is not a tdlib GitHub release, and is therefore not hosted at
1313+ # `https://github.com/tdlib/td/releases/tag/v1.6.9`. Please return to the `rev = "v${version}"` style on the next
1414+ # version bump if you can, since that will allow `nixpkgs-update` to update the package automatically.
1515+ rev = "32f2338bd199dd06a1b4b5f1ad14f2d4f2868f01";
1616+1717+ sha256 = "0wv03hlgzrsc04kcwnwz6dsmkdzvhb0i1wjs08gzivwxw06pkq4n";
1218 };
13191420 buildInputs = [ gperf openssl readline zlib ];
···21212222hashfile="$(nix-prefetch-url --print-path "https://github.com/electron/electron/releases/download/v${VERSION}/SHASUMS256.txt" 2>/dev/null | tail -n1)"
23232424-echo "Entry similar to the following goes in default.nix:"
2525-echo
2424+# Entry similar to the following goes in default.nix:
2525+2626echo " electron_${VERSION%%.*} = mkElectron \"${VERSION}\" {"
27272828for S in "${!SYSTEMS[@]}"; do
···15151616 doCheck = false;
17171818+ # Only build gopls, and not the integration tests or documentation generator.
1919+ subPackages = [ "." ];
2020+1821 meta = with stdenv.lib; {
1922 description = "Official language server for the Go language";
2023 homepage = "https://github.com/golang/tools/tree/master/gopls";
···44 # the frontend version corresponding to a specific home-assistant version can be found here
55 # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json
66 pname = "home-assistant-frontend";
77- version = "20201001.2";
77+ version = "20201021.3";
8899 src = fetchPypi {
1010 inherit pname version;
1111- sha256 = "1wyac980d8j8bk4bzh9y3a5c4xqfn3062wj5m45kwsx1f5rfx26j";
1111+ sha256 = "04z8rvmnpmy7xx90pvqcr58hsxjsc10mrrjcx7ppspglb91b9cpb";
1212 };
13131414 # no Python tests implemented
···11-{ stdenv, fetchurl, parted, utillinux }:
11+{ stdenv, fetchFromGitHub, parted, utillinux, pkg-config }:
2233stdenv.mkDerivation rec {
4455- version = "1.0.2";
55+ version = "1.1.0";
66 pname = "fatresize";
7788- src = fetchurl {
99- url = "mirror://sourceforge/fatresize/fatresize-${version}.tar.bz2";
1010- sha256 = "04wp48jpdvq4nn0dgbw5za07g842rnxlh9mig4mslz70zqs0izjm";
88+ src = fetchFromGitHub {
99+ owner = "ya-mouse";
1010+ repo = "fatresize";
1111+ rev = "v${version}";
1212+ sha256 = "1vhz84kxfyl0q7mkqn68nvzzly0a4xgzv76m6db0bk7xyczv1qr2";
1113 };
12141315 buildInputs = [ parted utillinux ];
1414-1515- # This patch helps this unmantained piece of software to be built against recent parted
1616- # It basically modifies the detection scheme for parted version (the current one has no micro version defined)
1717- # The second change is to include a header for a moved function since 1.6+ to current 3.1+ parted
1818- # The third change is to modify the call to PED_ASSERT that is no longer defined with 2 params
1919- patches = [ ./fatresize_parted_nix.patch ];
2020-2121- preConfigure = ''
2222- echo "Replacing calls to ped_free with free ..."
2323- substituteInPlace ./fatresize.c --replace ped_free free
2424- '';
2525-2626- # Filesystem resize functions were reintroduced in parted 3.1 due to no other available free alternatives
2727- # but in a sepparate library -> libparted-fs-resize --- that's why the added LDFLAG
2828- makeFlags = [ "LDFLAGS=-lparted-fs-resize" ];
1616+ nativeBuildInputs = [ pkg-config ];
29173018 propagatedBuildInputs = [ parted utillinux ];
31193220 meta = with stdenv.lib; {
3321 description = "The FAT16/FAT32 non-destructive resizer";
3434- homepage = "https://sourceforge.net/projects/fatresize";
2222+ homepage = "https://github.com/ya-mouse/fatresize";
3523 platforms = platforms.linux;
3636- license = licenses.gpl2;
2424+ license = licenses.gpl3;
3725 };
3826}
···2233buildPythonApplication rec {
44 pname = "you-get";
55- version = "0.4.1456";
55+ version = "0.4.1475";
6677 # Tests aren't packaged, but they all hit the real network so
88 # probably aren't suitable for a build environment anyway.
···10101111 src = fetchPypi {
1212 inherit pname version;
1313- sha256 = "14miw5gmj571584rmdzjxf88icmb1psrsfbwpabn8blz8l5aq6bv";
1313+ sha256 = "432c04170bb5f4881ca6af9c802b6c90e81759811487b8d7918762dcd674697f";
1414 };
15151616 meta = with stdenv.lib; {
+29-3
pkgs/tools/misc/zoxide/default.nix
···11{ lib
22+, stdenv
23, fetchFromGitHub
34, rustPlatform
45, withFzf ? true
56, fzf
77+88+ # checkInputs
99+, fish
1010+, powershell
1111+, shellcheck
1212+, shfmt
1313+, xonsh
1414+, zsh
615}:
716let
88- version = "0.4.3";
1717+ version = "0.5.0";
918in
1019rustPlatform.buildRustPackage {
1120 pname = "zoxide";
···1524 owner = "ajeetdsouza";
1625 repo = "zoxide";
1726 rev = "v${version}";
1818- sha256 = "1ghdal6pqkp56rqawhj26ch1x4cvnjj032xz3626aiddqgn134zj";
2727+ sha256 = "143lh94mw31pm9q7ib63h2k842g3h222mdabhf25hpb19lka2w5y";
1928 };
20293030+ # tests are broken on darwin
3131+ doCheck = !stdenv.isDarwin;
3232+3333+ # fish needs a writable HOME for whatever reason
3434+ preCheck = ''
3535+ export HOME=$(mktemp -d)
3636+ '';
3737+3838+ checkInputs = [
3939+ fish
4040+ powershell
4141+ shellcheck
4242+ shfmt
4343+ xonsh
4444+ zsh
4545+ ];
4646+2147 postPatch = lib.optionalString withFzf ''
2248 substituteInPlace src/fzf.rs \
2349 --replace '"fzf"' '"${fzf}/bin/fzf"'
2450 '';
25512626- cargoSha256 = "0klnjmda77bq9i9f0rz48jzaw4rcf7hafcjjpb0i570d7hlxnwsr";
5252+ cargoSha256 = "05mp101yk1zkjj1gwbkldizq6f9f8089gqgvq42c4ngq88pc7v9a";
27532854 meta = with lib; {
2955 description = "A fast cd command that learns your habits";