Skip to content

hackage2nix: user error (Error in $: Failed reading: not a valid json value. Expecting object value at '}') #123600

@teto

Description

@teto

Describe the bug
A clear and concise description of what the bug is.
follow up of #122719 (comment)

on commit be1e5f9 with nixExperimental (flakes enabled), I get

maintainers/scripts/haskell/regenerate-hackage-packages.sh
❯ maintainers/scripts/haskell/update-hackage.sh                                                                                                                                                                                                      
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5423  100  5423    0     0  22881      0 --:--:-- --:--:-- --:--:-- 22881
warning: unknown setting 'experimental-features'
[57.8 MiB DL]
path is '/nix/store/vp6dy5a94hbkrmvsl51n6x2k14qh04xs-45a46e6deaf5d304b5f604035fc301b4d5a957a3.tar.gz'
nixpkgs2 on  haskell-updates took 13s 
➜ maintainers/scripts/haskell/regenerate-hackage-packages.sh                                                                                                                                                                                         
warning: unknown setting 'experimental-features'
these derivations will be built:
  /nix/store/658ks0xlvr6zc7mz2g6dpd50d8l7yqay-unpacked-cabal-hashes.drv
Starting hackage2nix to regenerate pkgs/development/haskell-modules/hackage-packages.nix ...
warning: unknown setting 'experimental-features'
error: `stdenv.lib` is a deprecated alias for `lib`
(use '--show-trace' to show detailed location information)
hackage2nix: user error (Error in $: Failed reading: not a valid json value. Expecting object value at '}')

nix-env -qaP --json -f /path/to/nixpkgs --arg config "{ allowAliases = false; overlays = []; }" returns a seemlingly valid (visually) json but is followed by

error: `stdenv.lib` is a deprecated alias for `lib`
(use '--show-trace' to show detailed location information)
}%                   

To Reproduce
Steps to reproduce the behavior:

git checkout be1e5f9698b04dbf6e4d6f0a122348ef1ac69955
maintainers/scripts/haskell/regenerate-hackage-packages.sh
 maintainers/scripts/haskell/regenerate-hackage-packages.sh         

Expected behavior
no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: haskellGeneral-purpose, statically typed, purely functional programming language
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions