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

secp256k1-haskell: fix pkgconfig-depends #444

Merged
merged 1 commit into from Jun 4, 2020

Conversation

jtobin
Copy link
Contributor

@jtobin jtobin commented Mar 14, 2020

This library is currently broken in nixpkgs; overriding 'libsecp256k1' with 'secp256k1' in pkgconfig-depends unbreaks it.

I've tested that this works as expected by building cabal2nix, calling cabal2nix cabal://secp256k1-haskell-0.1.8, and running nix-build on the (appropriately-called) result.

See NixOS/nixpkgs#82562.

@cdepillabout
Copy link
Member

@jtobin Thanks for following up here.

I think the correct place to make this change is in this list:

-- | Map library names specified in Cabal files to Nix package identifiers.
--
-- TODO: This list should not be hard-coded here; it belongs into the Nixpkgs
-- repository.
--
-- TODO: Re-use hook matching system from PostProcess.hs here.
libNixName :: String -> [Identifier]
libNixName "" = []
libNixName "adns" = return "adns"
libNixName "alsa" = return "alsaLib"
libNixName "alut" = return "freealut"
libNixName "appindicator-0.1" = return "libappindicator-gtk2"
libNixName "appindicator3-0.1" = return "libappindicator-gtk3"
libNixName "asound" = return "alsaLib"
libNixName "b2" = return "libb2"

This is the list that maps pkg-config dependencies to their respective package name in nixpkgs.

Adding the correct mapping for libsecp256k1 to this list will make it so that any Haskell package that uses libsecp256k1 gets the correct system package in nixpkgs.

Unbreaks secp256k1-haskell and other Haskell packages that depend on it.
@jtobin
Copy link
Contributor Author

jtobin commented Mar 15, 2020

Nice catch, thanks. Done, and confirmed as working via the same test mentioned in OP.

@jtobin
Copy link
Contributor Author

jtobin commented Mar 15, 2020

(Oh, Dennis! Hi! We chatted in late 2018. Hope all's well! 😄)

@peti peti merged commit cb43579 into NixOS:master Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants