Skip to content

Comments

nixos/ircd-hybrid: fix bug in which fails to substitute iproute2#390833

Merged
SuperSandro2000 merged 1 commit intoNixOS:masterfrom
ret2pop:ret2pop/ircdhybrid-bugfix
Mar 18, 2025
Merged

nixos/ircd-hybrid: fix bug in which fails to substitute iproute2#390833
SuperSandro2000 merged 1 commit intoNixOS:masterfrom
ret2pop:ret2pop/ircdhybrid-bugfix

Conversation

@ret2pop
Copy link
Contributor

@ret2pop ret2pop commented Mar 18, 2025

… to substitute iproute2

iproute2 is named wrongly as iproute which causes the control.in file to have @iproute@ unsubstituted for the nix store path. This causes the service to fail instantly. This PR fixes this bug by naming it iproute2.

Example:

#! /nix/store/8vpg72ik2kgxfj05lc56hkqrdrfl8xi9-bash-5.2p37/bin/bash -e

# Make sure that the environment is deterministic.
export PATH=/nix/store/9m68vvhnsq5cpkskphgw84ikl9m6wjwp-coreutils-9.5/bin

if test "$1" = "start"; then
	if ! /nix/store/9bzy8ydbfsg3gkk11wcaxaj5kmgvp9s9-procps-4.0.4/bin/pgrep ircd; then
	if true; then 
		while ! @iproute@/sbin/ip addr | 
			/nix/store/qjsj5vnbfpbg6r7jhd7znfgmcy0arn8n-gnugrep-3.11/bin/grep inet6 | 
			/nix/store/qjsj5vnbfpbg6r7jhd7znfgmcy0arn8n-gnugrep-3.11/bin/grep global; do
			sleep 1;
		done;
	fi;
	rm -rf /home/ircd
	mkdir -p /home/ircd
	chown ircd: /home/ircd
	cd /home/ircd
    env - HOME=/homeless-shelter $extraEnv \
        /nix/store/hny4q04ns200gn6kvcmwj4w1pf9vv5zf-shadow-4.16.0-su/bin/su ircd --shell=/bin/sh -c ' /nix/store/grii6znymhv7rjfk2gp47c42bzj7gxpy-ircd-hybrid-8.2.45/bin/ircd -configfile /nix/store/7a54cd81klvx50h8hpjp49777h60p1bq-ircd-hybrid-service/conf/ircd.conf </dev/null -logfile /home/ircd/ircd.log' 2>&1 >/var/log/ircd-hybrid.out
	fi;
fi

if test "$1" = "stop" ; then 
	/nix/store/9bzy8ydbfsg3gkk11wcaxaj5kmgvp9s9-procps-4.0.4/bin/pkill ircd;
fi;

The problem line is: while ! @iproute@/sbin/ip addr |.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 18, 2025
@SuperSandro2000 SuperSandro2000 changed the title nixos/modules/services/networking/ircd-hybrid: fix bug in which fails… nixos/ircd-hybrid: fix bug in which fails Mar 18, 2025
@SuperSandro2000 SuperSandro2000 changed the title nixos/ircd-hybrid: fix bug in which fails nixos/ircd-hybrid: fix bug in which fails to substitute iproute2 Mar 18, 2025
@SuperSandro2000 SuperSandro2000 merged commit 437ae0f into NixOS:master Mar 18, 2025
59 checks passed
@ret2pop ret2pop deleted the ret2pop/ircdhybrid-bugfix branch March 19, 2025 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants