nethack-x11

maintainer Forty-Bot · 32 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The source downloads are from nethack.org and a Gentoo bug tracker, both plausible project-related hosts; the package builds from source and installs standard game files, with no evidence of malicious or unverifiable code execution.

Triggered rules

LOW AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The source downloads are from nethack.org and a Gentoo bug tracker, both plausible project-related hosts; the package builds from source and installs standard game files, with no evidence of malicious or unverifiable code execution.

1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM source=() URL on a non-standard host source_untrusted_domain

One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).

  • PKGBUILD:21 source=("https://nethack.org/download/${pkgver}/nethack-${pkgver//./}-src.tgz"
  • PKGBUILD:24 'nethack-x11.png::http://bugs.gentoo.org/attachment.cgi?id=86458')

PKGBUILD

2 offending line(s) highlighted
1# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
2# Contributor: Sascha Lüdecke <sascha@meta-x.de>
3# Contributor: Jamie <dyscoria@googlemail.com>
4
5pkgname=nethack-x11
6pkgver=3.6.7
7pkgrel=1
8pkgdesc='Single-player roguelike dungeon exploration game (X11 version)'
9arch=('x86_64' 'i686')
10url='http://nethack.org/'
11license=('custom')
12depends=('libxaw')
13makedepends=('setconf' 'gendesk')
14conflicts=('nethack')
15backup=('etc/nethackrc'
16 'var/games/nethack/logfile'
17 'var/games/nethack/xlogfile'
18 'var/games/nethack/perm'
19 'var/games/nethack/record'
20 'usr/games/nethack/sysconf')
21source=("https://nethack.org/download/${pkgver}/nethack-${pkgver//./}-src.tgz"
22 'nethack-x11.patch'
23 'warn_unused.patch'
24 'nethack-x11.png::http://bugs.gentoo.org/attachment.cgi?id=86458')
25sha256sums=('98cf67df6debf9668a61745aa84c09bcab362e5d33f5b944ec5155d44d2aacb2'
26 '685d68cbbd2c9854b52d71e53ca2c73c95adef43b79e7d36b6c244dc86f796e5'
27 '6bbfb4cba6baa3b112cf5ae98593210736946f5778e8c252a925e699c02bbf2b'
28 'e1e0b059c617af04ee88bed4b03b73c02f022663e001c5485fe9900ca2d76295')
29
30prepare() {
31 cd "NetHack-${pkgver}"
32
33 gendesk -n -f \
34 --pkgname "$pkgname" \
35 --pkgdesc "$pkgdesc" \
36 --exec nethack \
37 --genericname Nethack \
38 --name 'Nethack (X11)'
39
40 ####
41 ###
42 ## Issues (upstream)
43 #
44 # - the tty mode is somehow not working
45 # - the contents of NETHACKOPTIONS is possibly ignored
46 # - the tile size doubling in Xresources may not work
47 # - custom tile files in sysconf/nethackrc may not work
48 # - ~/.nethackrc is somehow not working
49 ##
50 ###
51 ####
52
53 patch -Np1 -i "$srcdir/warn_unused.patch"
54 patch -Np1 -i "$srcdir/nethack-x11.patch"
55
56 # Create /etc/nethackrc with OPTIONS=windowtype:X11
57 setconf -a nethackrc OPTIONS 'windowtype:X11'
58
59 # Add two new lines to nethack.sh
60 sed -i \
61 's|export HACKDIR|NETHACKOPTIONS=\nexport NETHACKOPTIONS\nexport HACKDIR|' \
62 sys/unix/nethack.sh
63
64 # Set HACKDIR and HACK
65 setconf sys/unix/nethack.sh HACKDIR '/var/games/nethack/'
66 setconf sys/unix/nethack.sh HACK '/usr/lib/nethack/nethack'
67
68 # Set NETHACKOPTIONS
69 setconf sys/unix/nethack.sh NETHACKOPTIONS '@/etc/nethackrc'
70
71 # # Change Nethack.ad settings
72 sed 's/variable/fixed/' -i win/X11/NetHack.ad
73 sed 's/nh10/fixed/' -i win/X11/NetHack.ad
74 sed 's/!NetHack.tile_file/NetHack.tile_file/' -i win/X11/NetHack.ad
75
76 # From community/nethack
77 sed -e '/^HACKDIR/ s|/games/lib/\$(GAME)dir|/var/games/nethack/|' \
78 -e '/^SHELLDIR/ s|/games|/usr/bin|' \
79 -e '/^VARDIRPERM/ s|0755|0775|' \
80 -e '/^VARFILEPERM/ s|0600|0664|' \
81 -e '/^GAMEPERM/ s|0755|02755|' \
82 -e '/CURSES_GRAPHICS/ s|^|#|' \
83 -e 's|\(DSYSCF_FILE=\)\\"[^"]*\\"|\1\\"/var/games/nethack/sysconf\\"|' \
84 -e 's|\(DHACKDIR=\)\\"[^"]*\\"|\1\\"/var/games/nethack/\\"|' -i sys/unix/hints/linux
85
86 sed -e "/^MANDIR\s*=/s|/usr/man/man6|$pkgdir/usr/share/man/man6|" -i sys/unix/Makefile.doc
87}
88
89build() {
90 cd "NetHack-${pkgver}/sys/unix"
91 sh setup.sh hints/linux
92
93 cd ../..
94 make
95}
96
97package() {
98 cd "NetHack-${pkgver}"
99
100 install -dm755 $pkgdir/usr/share/{man/man6,doc/nethack}
101 install -dm775 $pkgdir/var/games/
102 make PREFIX=$pkgdir -j1 install manpages # Multi-threaded builds fail.
103
104 install -dm755 $pkgdir/usr/lib/nethack
105 mv $pkgdir/var/games/nethack/{nethack,recover} $pkgdir/usr/lib/nethack/
106
107 chown -R root:games $pkgdir/var/games/
108 chown root:games $pkgdir/usr/lib/nethack/nethack
109
110 install -Dm644 nethackrc "$pkgdir/etc/nethackrc"
111 install -Dm644 dat/license "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
112 install -Dm644 win/X11/nethack.rc "$pkgdir/usr/share/doc/$pkgname/nethackrc"
113 install -Dm644 doc/Guidebook.txt "$pkgdir/usr/share/doc/$pkgname/Guidebook.txt"
114 install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
115 install -Dm644 "../$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
116 install -g games -Dm644 sys/unix/sysconf "$pkgdir/usr/games/nethack/sysconf"
117}
118
119# vim:set ts=2 sw=2 et:
120

Scan history

Scanned at (UTC)SeverityRules
2026-08-03 00:08:14 LOW 2
2026-08-02 00:16:08 LOW 2
2026-08-01 00:11:18 LOW 2
2026-07-31 00:14:10 LOW 2
2026-07-30 00:17:23 LOW 2
2026-07-29 00:25:53 LOW 2
2026-07-28 00:07:28 LOW 2
2026-07-27 00:24:32 LOW 2
2026-07-26 00:07:32 LOW 2
2026-07-25 00:13:44 LOW 2
2026-07-24 00:02:28 LOW 2
2026-07-23 00:14:47 LOW 2
2026-07-22 00:29:32 LOW 2
2026-07-21 00:24:15 LOW 2
2026-07-20 00:19:49 LOW 2
2026-07-19 00:17:08 LOW 2
2026-07-18 00:14:48 LOW 2
2026-07-17 00:06:16 LOW 2
2026-07-16 00:05:41 LOW 2
2026-07-15 00:09:25 LOW 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion