repo icon indicating copy to clipboard operation
repo copied to clipboard

nixfmt

Open Misaka13514 opened this issue 2 years ago • 3 comments

问题类型 / Type of issues

  • 过期软件包 / out-of-date packages

受影响的软件包 / Affected packages

  • nixfmt

$ nixfmt configuration.nix 
nixfmt: error while loading shared libraries: libHSsafe-exceptions-0.1.7.3-BbZAXGcuv3aD0WfEctV6iQ-ghc9.0.2.so: cannot open shared object file: No such file or directory
  • 使用 AUR 可以打包并正常运行。
  • 使用 archlinuxcn/repo中的PKGBUILD 自行打包失败:
    $ makechrootpkg -c -r /mnt/chroots/arch/
    ==> Synchronizing chroot copy [/mnt/chroots/arch/root] -> [atri]...done
    ==> Making package: nixfmt 0.5.0-1 (Sat Jun 17 19:43:57 2023)
    ==> Retrieving sources...
      -> Found nixfmt-0.5.0.tar.gz
    ==> Validating source files with sha256sums...
        nixfmt-0.5.0.tar.gz ... Passed
    ==> Making package: nixfmt 0.5.0-1 (Sat Jun 17 19:44:00 2023)
    ==> Checking runtime dependencies...
    ==> Installing missing dependencies...
    resolving dependencies...
    looking for conflicting packages...
    
    Packages (14) haskell-base-orphans-0.8.7-54  haskell-case-insensitive-1.2.1.0-183  haskell-data-array-byte-0.1.0.1-15  haskell-ghc-bignum-orphans-0.1.1-1  haskell-hashable-1.4.2.0-23
                  haskell-integer-logarithms-1.0.3.1-6  haskell-primitive-0.7.4.0-71  haskell-scientific-0.3.7.0-93  numactl-2.0.16-1  ghc-libs-9.0.2-3  haskell-cmdargs-0.10.22-1
                  haskell-megaparsec-9.3.1-3  haskell-parser-combinators-1.3.0-4  haskell-safe-exceptions-0.1.7.3-38
    
    Total Installed Size:  147.91 MiB
    
    :: Proceed with installation? [Y/n] 
    (14/14) checking keys in keyring                                                                                 [####################################################################] 100%
    (14/14) checking package integrity                                                                               [####################################################################] 100%
    (14/14) loading package files                                                                                    [####################################################################] 100%
    (14/14) checking for file conflicts                                                                              [####################################################################] 100%
    (14/14) checking available disk space                                                                            [####################################################################] 100%
    :: Processing package changes...
    ( 1/14) installing numactl                                                                                       [####################################################################] 100%
    ( 2/14) installing ghc-libs                                                                                      [####################################################################] 100%
    ( 3/14) installing haskell-cmdargs                                                                               [####################################################################] 100%
    ( 4/14) installing haskell-base-orphans                                                                          [####################################################################] 100%
    ( 5/14) installing haskell-data-array-byte                                                                       [####################################################################] 100%
    ( 6/14) installing haskell-ghc-bignum-orphans                                                                    [####################################################################] 100%
    ( 7/14) installing haskell-hashable                                                                              [####################################################################] 100%
    ( 8/14) installing haskell-case-insensitive                                                                      [####################################################################] 100%
    ( 9/14) installing haskell-parser-combinators                                                                    [####################################################################] 100%
    (10/14) installing haskell-integer-logarithms                                                                    [####################################################################] 100%
    (11/14) installing haskell-primitive                                                                             [####################################################################] 100%
    (12/14) installing haskell-scientific                                                                            [####################################################################] 100%
    (13/14) installing haskell-megaparsec                                                                            [####################################################################] 100%
    (14/14) installing haskell-safe-exceptions                                                                       [####################################################################] 100%
    :: Running post-transaction hooks...
    (1/1) Registering Haskell modules...
    ==> Checking buildtime dependencies...
    ==> Installing missing dependencies...
    resolving dependencies...
    looking for conflicting packages...
    
    Packages (5) libedit-20221030_3.1-1  llvm14-14.0.6-3  llvm14-libs-14.0.6-3  ghc-9.0.2-3  uusi-0.4.2.0-130
    
    Total Installed Size:  360.65 MiB
    
    :: Proceed with installation? [Y/n] 
    (5/5) checking keys in keyring                                                                                   [####################################################################] 100%
    (5/5) checking package integrity                                                                                 [####################################################################] 100%
    (5/5) loading package files                                                                                      [####################################################################] 100%
    (5/5) checking for file conflicts                                                                                [####################################################################] 100%
    (5/5) checking available disk space                                                                              [####################################################################] 100%
    :: Processing package changes...
    (1/5) installing libedit                                                                                         [####################################################################] 100%
    (2/5) installing llvm14-libs                                                                                     [####################################################################] 100%
    (3/5) installing llvm14                                                                                          [####################################################################] 100%
    (4/5) installing ghc                                                                                             [####################################################################] 100%
    (5/5) installing uusi                                                                                            [####################################################################] 100%
    ==> Retrieving sources...
      -> Found nixfmt-0.5.0.tar.gz
    ==> WARNING: Skipping all source file integrity checks.
    ==> Extracting sources...
      -> Extracting nixfmt-0.5.0.tar.gz with bsdtar
    ==> Starting prepare()...
    Write file: /build/nixfmt/src/nixfmt-0.5.0/Setup.hs
    ==> Starting build()...
    Configuring nixfmt-0.5.0...
    Setup: Encountered missing or private dependencies:
    megaparsec >=9.0.1 && <9.3
    
    ==> ERROR: A failure occurred in build().
        Aborting...
    ==> ERROR: Build failed, check /mnt/chroots/arch/atri/build
    

Misaka13514 avatar Jun 17 '23 11:06 Misaka13514

pkgbase build history last build log
nixfmt build history last build log

Some maintainers (perhaps outside contributors) cannot be assigned: @berberman

lilacbot avatar Jun 17 '23 11:06 lilacbot

目前 [extra] 中 megaparsec 的版本为 9.3.1,但 nixmt 0.5.0 对其版本的约束为 megaparsec >= 9.0.1 && < 9.3——构建因此失败。我们可以尝试在 PKGBUILD 的 prepare() 末尾加入 uusi -u megaparsec $pkgname.cabal 来去掉这个版本约束,以便能够使用新版本 megaparsec 构建 nixfmt。

至于 AUR 中的 nixfmt,与 CN 源中的不相同,它使用了 cabal-install 为打包工具而不依赖 [extra] 中的 Haskell 基础设施,因此可以构建成功。

berberman avatar Jun 17 '23 13:06 berberman

@berberman https://github.com/serokell/nixfmt/releases/tag/v0.6.0

Misaka13514 avatar Nov 01 '23 12:11 Misaka13514

Package was removed.

oldherl avatar Aug 04 '24 06:08 oldherl