nixfmt
MEDIUM
maintainer kaathe
6 votes
scanned 2026-10-27 03:46:34.713263
Why flagged
This package was orphaned and re-adopted within the last 30 days — a window where ownership transfers can introduce malicious changes.
Triggered rules
Medium
Recently orphaned & re-adopted
orphaned_readopted
This package was orphaned and re-adopted within the last 30 days — a window where ownership transfers can introduce malicious changes.
PKGBUILD
1
# Maintainer: Jamie Magee <jamie dot magee at gmail dot com>
2
3
pkgname=nixfmt
4
pkgver=1.5.0 # renovate: datasource=github-tags depName=NixOS/nixfmt
5
pkgrel=1
6
pkgdesc="Official formatter for Nix code"
7
url="https://github.com/NixOS/nixfmt"
8
license=("MPL-2.0")
9
arch=('x86_64')
10
depends=('ghc-libs' 'haskell-cmdargs' 'haskell-megaparsec' 'haskell-parser-combinators' 'haskell-safe-exceptions' 'haskell-scientific' 'haskell-file-embed' 'haskell-pretty-simple')
11
makedepends=('ghc' 'uusi')
12
source=("https://github.com/NixOS/$pkgname/archive/v$pkgver.tar.gz")
13
b2sums=('524b10c7ba2ec9d6701370100d123e917d68f27a05e8d802030cfb5d5a205ba9aa3a070aaed863a76d4af0342a4d1d74c0aa4bbdf4f6e09bd3ea4128bd08ecbc')
14
15
prepare() {
16
cd $pkgname-$pkgver
17
18
# GHC 9.6 supports GHC2024's extensions, but not the edition alias.
19
sed -Ei 's/(default-language:[[:space:]]*)GHC2024/\1GHC2021/' $pkgname.cabal
20
sed -i '/common warnings/a\ default-extensions: DataKinds DerivingStrategies DisambiguateRecordFields ExplicitNamespaces GADTs LambdaCase MonoLocalBinds RoleAnnotations' $pkgname.cabal
21
22
uusi $pkgname.cabal
23
}
24
25
build() {
26
cd $pkgname-$pkgver
27
28
gen-setup
29
runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
30
--prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
31
--dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
32
--ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
33
--ghc-option='-pie'
34
35
runhaskell Setup build
36
runhaskell Setup register --gen-script
37
runhaskell Setup unregister --gen-script
38
sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
39
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
40
}
41
42
check() {
43
cd $pkgname-$pkgver
44
runhaskell Setup test
45
}
46
47
package() {
48
cd $pkgname-$pkgver
49
50
install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
51
install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
52
runhaskell Setup copy --destdir="$pkgdir"
53
install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
54
rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
55
}
56
Changes since previous scan
--- PKGBUILD @ 2026-07-07 23:26+++ PKGBUILD @ 2026-10-27 03:46@@ -1,7 +1,7 @@ # Maintainer: Jamie Magee <jamie dot magee at gmail dot com> pkgname=nixfmt-pkgver=1.4.0 # renovate: datasource=github-tags depName=NixOS/nixfmt+pkgver=1.5.0 # renovate: datasource=github-tags depName=NixOS/nixfmt pkgrel=1 pkgdesc="Official formatter for Nix code" url="https://github.com/NixOS/nixfmt"@@ -10,10 +10,16 @@ depends=('ghc-libs' 'haskell-cmdargs' 'haskell-megaparsec' 'haskell-parser-combinators' 'haskell-safe-exceptions' 'haskell-scientific' 'haskell-file-embed' 'haskell-pretty-simple') makedepends=('ghc' 'uusi') source=("https://github.com/NixOS/$pkgname/archive/v$pkgver.tar.gz")-b2sums=('1f099c1adbd3514c6b4e079741035e152e3d9dbbe7ab1c2b724420408704bf90ac7b70869768c1f7158e5cc8efd9976095b3ce0573cdf509c8c624be1074e354')+b2sums=('524b10c7ba2ec9d6701370100d123e917d68f27a05e8d802030cfb5d5a205ba9aa3a070aaed863a76d4af0342a4d1d74c0aa4bbdf4f6e09bd3ea4128bd08ecbc') prepare() {- uusi $pkgname-$pkgver/$pkgname.cabal+ cd $pkgname-$pkgver++ # GHC 9.6 supports GHC2024's extensions, but not the edition alias.+ sed -Ei 's/(default-language:[[:space:]]*)GHC2024/\1GHC2021/' $pkgname.cabal+ sed -i '/common warnings/a\ default-extensions: DataKinds DerivingStrategies DisambiguateRecordFields ExplicitNamespaces GADTs LambdaCase MonoLocalBinds RoleAnnotations' $pkgname.cabal++ uusi $pkgname.cabal } build() {Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-27 03:46:34 | Medium | 1 |
| 2026-10-27 00:23:28 | Clean | 2 |
| 2026-10-26 21:45:59 | Medium | 1 |
| 2026-09-11 05:22:12 | Clean | 0 |
| 2026-07-07 23:26:11 | Clean | 0 |
| 2026-06-18 16:11:54 | Clean | 0 |