Skip to content

"Getting started" from template fails #2518

Description

@pmiddend

Describe the bug

I assume the bug is fixed simply by adapting the Nix template, but I leave that up to you. If the "getting started" example of a project fails, I, and probably most other users, bail out of the thing altogether.

• Added input 'flake-utils':
    'github:numtide/flake-utils/11707dc2f618dd54ca8739b309ec4fc024de578b' (2024-11-13)
• Added input 'flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
• Added input 'haskellNix':
    'github:input-output-hk/haskell.nix/125a3d19574fc80840ec4e071e56b514645fa1f3' (2026-06-04)
• Added input 'haskellNix/HTTP':
    'github:phadej/HTTP/9bc0996d412fef1787449d841277ef663ad9a915' (2016-01-01)
• Added input 'haskellNix/cabal-34':
    'github:haskell/cabal/5ff598c67f53f7c4f48e31d722ba37172230c462' (2022-02-26)
• Added input 'haskellNix/cabal-36':
    'github:haskell/cabal/8fd619e33d34924a94e691c5fea2c42f0fc7f144' (2022-11-22)
• Added input 'haskellNix/cardano-shell':
    'github:input-output-hk/cardano-shell/9392c75087cb9a3d453998f4230930dea3a95725' (2020-12-21)
• Added input 'haskellNix/flake-compat':
    'github:input-output-hk/flake-compat/45f2638735f8cdc40fe302742b79f248d23eb368' (2023-01-04)
• Added input 'haskellNix/hackage':
    'github:input-output-hk/hackage.nix/63b7074a0c2041eeeb6bfd4eb95f41c6e6a1d1c0' (2026-06-04)
• Added input 'haskellNix/hackage-for-stackage':
    'github:input-output-hk/hackage.nix/a053f9f96cda00c55c08b6076db0b74a30463432' (2026-06-04)
• Added input 'haskellNix/hackage-internal':
    'github:input-output-hk/hackage.nix/f7867baa8817fab296528f4a4ec39d1c7c4da4f3' (2025-06-19)
• Added input 'haskellNix/hls':
    'github:haskell/haskell-language-server/682d6894c94087da5e566771f25311c47e145359' (2025-03-10)
• Added input 'haskellNix/hls-1.10':
    'github:haskell/haskell-language-server/b08691db779f7a35ff322b71e72a12f6e3376fd9' (2023-03-28)
• Added input 'haskellNix/hls-2.0':
    'github:haskell/haskell-language-server/783905f211ac63edf982dd1889c671653327e441' (2023-06-25)
• Added input 'haskellNix/hls-2.10':
    'github:haskell/haskell-language-server/2318c61db3a01e03700bd4b05665662929b7fe8b' (2025-03-27)
• Added input 'haskellNix/hls-2.11':
    'github:haskell/haskell-language-server/46ef4523ea4949f47f6d2752476239f1c6d806fe' (2025-05-15)
• Added input 'haskellNix/hls-2.12':
    'github:haskell/haskell-language-server/7d983de4fa7ff54369f6dd31444bdb9869aec83e' (2025-09-24)
• Added input 'haskellNix/hls-2.2':
    'github:haskell/haskell-language-server/b30f4b6cf5822f3112c35d14a0cba51f3fe23b85' (2023-08-26)
• Added input 'haskellNix/hls-2.3':
    'github:haskell/haskell-language-server/458ccdb55c9ea22cd5d13ec3051aaefb295321be' (2023-09-28)
• Added input 'haskellNix/hls-2.4':
    'github:haskell/haskell-language-server/54507ef7e85fa8e9d0eb9a669832a3287ffccd57' (2023-11-13)
• Added input 'haskellNix/hls-2.5':
    'github:haskell/haskell-language-server/27f8c3d3892e38edaef5bea3870161815c4d014c' (2023-11-27)
• Added input 'haskellNix/hls-2.6':
    'github:haskell/haskell-language-server/6e0b342fa0327e628610f2711f8c3e4eaaa08b1e' (2024-01-15)
• Added input 'haskellNix/hls-2.7':
    'github:haskell/haskell-language-server/50322b0a4aefb27adc5ec42f5055aaa8f8e38001' (2024-02-26)
• Added input 'haskellNix/hls-2.8':
    'github:haskell/haskell-language-server/dd1be1beb16700de59e0d6801957290bcf956a0a' (2024-05-08)
• Added input 'haskellNix/hls-2.9':
    'github:haskell/haskell-language-server/90319a7e62ab93ab65a95f8f2bcf537e34dae76a' (2024-07-03)
• Added input 'haskellNix/hpc-coveralls':
    'github:sevanspowell/hpc-coveralls/14df0f7d229f4cd2e79f8eabb1a740097fdfa430' (2020-12-09)
• Added input 'haskellNix/iserv-proxy':
    'github:stable-haskell/iserv-proxy/8cdc446f8e2d91b120ecc075063e9475d387df52' (2026-05-10)
• Added input 'haskellNix/nixpkgs':
    follows 'haskellNix/nixpkgs-unstable'
• Added input 'haskellNix/nixpkgs-2305':
    'github:NixOS/nixpkgs/a1982c92d8980a0114372973cbdfe0a307f1bdea' (2024-01-12)
• Added input 'haskellNix/nixpkgs-2311':
    'github:NixOS/nixpkgs/7144d6241f02d171d25fba3edeaf15e0f2592105' (2024-07-02)
• Added input 'haskellNix/nixpkgs-2405':
    'github:NixOS/nixpkgs/1e7a8f391f1a490460760065fa0630b5520f9cf8' (2024-12-30)
• Added input 'haskellNix/nixpkgs-2411':
    'github:NixOS/nixpkgs/5ab036a8d97cb9476fbe81b09076e6e91d15e1b6' (2025-06-30)
• Added input 'haskellNix/nixpkgs-2505':
    'github:NixOS/nixpkgs/6c8f0cca84510cc79e09ea99a299c9bc17d03cb6' (2025-12-01)
• Added input 'haskellNix/nixpkgs-2511':
    'github:NixOS/nixpkgs/74b87959b2d16f59f54d8559cf3cf26b9d907949' (2026-04-09)
• Added input 'haskellNix/nixpkgs-unstable':
    'github:NixOS/nixpkgs/13043924aaa7375ce482ebe2494338e058282925' (2026-04-11)
• Added input 'haskellNix/old-ghc-nix':
    'github:angerman/old-ghc-nix/af48a7a7353e418119b6dfe3cd1463a657f342b8' (2021-09-08)
• Added input 'haskellNix/stackage':
    'github:input-output-hk/stackage.nix/f364b83c2f8f50660eba08efd11d10f927b3817d' (2026-06-04)
• Added input 'nixpkgs':
    follows 'haskellNix/nixpkgs-unstable'
warning: Nixpkgs 26.05 will be the last release to support x86_64-darwin; see https://nixos.org/manual/nixpkgs/unstable/release-notes#x86_64-darwin-26.05
error:
       … while evaluating the attribute 'packages'
         at /nix/store/8vh85r5jajwxlaq41xm7k68c8h10v3r3-source/flake.nix:31:9:
           30|
           31|         packages = flake.packages // { default = flake.packages."hello:exe:hello"; };
             |         ^
           32|       });

       … while evaluating the attribute 'packages'
         at /nix/store/imvcsn32zp098brrgxkzh9hn580a0b4p-source/lib/default.nix:412:7:
          411|       inherit name;
          412|       value =
             |       ^
          413|         # This favours the first item (`a`) in the case of duplicates

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: Desired GHC (9.2.6) is older than the oldest GHC haskell.nix might work with (GHC 9.6).

       note: trace involved the following derivations:
       derivation 'haskell-project-plan-to-nix-pkgs'

Steps To Reproduce

  1. Create a directory, execute nix flake init --template templates#haskell-nix --impure as described in the getting started guide.
  2. Execute nix develop as described in the mentioned guide

Expected behavior

I enter a dev shell with my dependencies in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    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