Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nim_builder: fails to build package when config.nims is missing a line ending #391297

Closed
3 tasks done
daylinmorgan opened this issue Mar 19, 2025 · 0 comments · Fixed by #391298
Closed
3 tasks done

nim_builder: fails to build package when config.nims is missing a line ending #391297

daylinmorgan opened this issue Mar 19, 2025 · 0 comments · Fixed by #391298
Assignees
Labels
0.kind: bug Something is broken

Comments

@daylinmorgan
Copy link
Contributor

daylinmorgan commented Mar 19, 2025

Nixpkgs version

  • Unstable (25.05)

Describe the bug

nim_builder adds the line switch("backend", "c") to config.nims, but if config.nims has no line-ending it makes incorrect syntax so package build fails.

Steps to reproduce

Update nimble in nixos to v.18.0 and use nix build.

Expected behaviour

build completes successfully

Screenshots

No response

Relevant log output

Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/h578k9z8vpc2sdy00qwgvh7i1civzia4-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
generating config.nims
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build job 0: nim compile --define:git_revision_override=v0.18.0 --parallelBuild:8 --outdir:/nix/store/ml4qqrf587a5bx3z6n2wbshnaishs351-nimble-0.18.0/bin src/nimble
�[1m/build/source/config.nims(9, 38) �[0m�[31mError: �[0mexpression 'switch("backend", "c")' has no type (or is ambiguous)�[36m�[0m�[0m
build phase failed

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.13.7, NixOS, 25.05 (Warbler), 25.05.20250315.c80f6a7
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Lix, like Nix) 2.93.0-dev-pre20250318-6e6ff58 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/daylin/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/daylin/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/daylin/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/daylin/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/32siqmws3z1ivk3546ahfa1phavzyxwa-lix-2.93.0-dev-pre20250318-6e6ff58/share
  • channels(root): "nixos-23.11"
  • nixpkgs: /nix/store/alzxn3hjisc84hrlv44x6hni48crww26-source

Notify maintainers

@ehmry


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant