Skip to content

Fix build for openai-hs#223590

Merged
cdepillabout merged 1 commit intoNixOS:haskell-updatesfrom
MercuryTechnologies:gabriella/openai-hs
Apr 1, 2023
Merged

Fix build for openai-hs#223590
cdepillabout merged 1 commit intoNixOS:haskell-updatesfrom
MercuryTechnologies:gabriella/openai-hs

Conversation

@Gabriella439
Copy link
Contributor

@Gabriella439 Gabriella439 commented Mar 28, 2023

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Mar 28, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 28, 2023
Copy link
Member

@cdepillabout cdepillabout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a look at this!

Can you update the PR title and commit message at adhere to https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#submitting-changes?

Other than that, this LGTM.

@ofborg build haskellPackages.openai-hs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hydraPlatforms = lib.platforms.none;

You'll also need to remove this line, otherwise Hydra won't build the package.

You can also run maintainers/scripts/haskell/regenerate-hackage-packages.sh instead of modifying this file yourself.

@cdepillabout
Copy link
Member

Oh, maybe ofborg doesn't work in a review comment thing. Let's try again:

@ofborg build haskellPackages.openai-hs

@Gabriella439
Copy link
Contributor Author

Gabriella439 commented Mar 31, 2023

hmm, i tried that but it fails with:

$ maintainers/scripts/haskell/regenerate-hackage-packages.sh
maintainers/scripts/haskell/regenerate-hackage-packages.sh: line 24: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory
Obtaining Hackage data
Generating compiler configuration
Starting hackage2nix to regenerate pkgs/development/haskell-modules/hackage-packages.nix ...
hackage2nix: constraint doctest >=0.18 && <0.19 cannot be resolved in Hackage
This could be due the package being missing in the hackage directory
or the file system not being case sensitive.

CallStack (from HasCallStack):
  error, called at hackage2nix/Main.hs:203:34 in main:Main
hackage2nix: thread blocked indefinitely in an MVar operation

… so i went ahead and made the modification manually

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 31, 2023
@cdepillabout cdepillabout merged commit dfbaa98 into NixOS:haskell-updates Apr 1, 2023
@cdepillabout
Copy link
Member

i tried that but it fails with:

Ah, sorry about that. Normally you can use regenerate-hackage-packages.sh, but there is a rare case where we've updated the haskell-updates branch, and cabal2nix itself has broke, so regenerate-hackage-packages.sh can't be run! It is relatively uncommon, but I guess it was just unfortunate timing.

Thanks!

@cdepillabout
Copy link
Member

Oh, I should have also suggested that you add yourself to the maintainers of openai-hs if you want to make sure it is always working. That way you'd get pinged if it breaks.

@maralorn
Copy link
Member

maralorn commented Apr 7, 2023

openai-hs currently still has a build error on x86 linux: https://hydra.nixos.org/log/x80hzbi4b3zfwz636mvs222h00gi4vzh-openai-hs-0.2.2.0.drv

I will refrain from marking it broken again for this merge because it apparently works at least on darwin.
But unless we do some kind of intervention it will get marked broken semi-automatically in the future.

@sternenseemann
Copy link
Member

You can work around that by disabling profiling (which is quite a headache though): https://gitlab.haskell.org/ghc/ghc/-/issues/21291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments