Skip to content

x509-system has "secret" dependencies that are not represented #3629

Closed

Description

@copumpkin

I just spent ages trying to figure out an obscure error in a package that depends very indirectly from it:

Left (HTTPConnectionError security: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory))

Turns out that x509-system calls out (somewhat unsurprisingly) to your local system utilities for certificate management, and those dependencies are not represented in the nix expression. On Mac OS, it calls out to the built-in "security" utility, for example: https://github.com/vincenthz/hs-certificate/blob/0c6befefb01a9a18ed2f038341ddc31cbe57a0f2/x509-system/System/X509/MacOS.hs#L19. On a linux system it's reaching out to a fixed filesystem path.

Flatting for @peti who I believe maintains the cabal2nix packages.

Activity

  1. copumpkin commented on Sep 30, 2014

    @copumpkin
    MemberAuthor

    Pull request #4326 should allow us to explicitly depend on the security tool in darwin. I still don't know how to modify the x509-system expression given that it's autogenerated. @peti, what is the procedure there?

  2. peti commented on Oct 3, 2014

    @peti
    Member

    The module src/Cabal2Nix/PostProcess.hs in cabal2nix allows adding any dependency to the expression that you see fit. It's probably a good idea to use some generic name, like certParsingTool or whatever, and then to configure that value with the appropriate system-dependent path/package in haskell-packages.nix. This way, the system-dependent decision making can stay outside of the generated expression.

    It might also be worthwhile to report this issue upstream.

  3. copumpkin commented on Oct 3, 2014

    @copumpkin
    MemberAuthor

    Your point about the generic dependency makes sense to me, but what do you mean by reporting the issue upstream? It doesn't seem like an issue unless you're running in nix.

    On Oct 3, 2014, at 13:22, Peter Simons [email protected] wrote:

    The module src/Cabal2Nix/PostProcess.hs in cabal2nix allows adding any dependency to the expression that you see fit. It's probably a good idea to use some generic name, like certParsingTool or whatever, and then to configure that value with the appropriate system-dependent path/package in haskell-packages.nix. This way, the system-dependent decision making can stay outside of the generated expression.

    It might also be worthwhile to report this issue upstream.

    —
    Reply to this email directly or view it on GitHub.

  4. peti commented on Oct 3, 2014

    @peti
    Member

    IMHO, the package should declare those dependencies in its Cabal file

  5. copumpkin commented on Oct 3, 2014

    @copumpkin
    MemberAuthor

    Ah, fair enough

    On Oct 3, 2014, at 15:37, Peter Simons [email protected] wrote:

    IMHO, the package should declare those dependencies in its Cabal file

    —
    Reply to this email directly or view it on GitHub.

  6. peti commented on Nov 8, 2014

    @peti
    Member

    What is the state of this issue? I understand the security package now exists in Nixpkgs? Shall we add a reference to that package via cabal2nix?

  7. added
    9.needs: reporter feedback
    on Nov 8, 2014
  8. copumpkin commented on Jan 14, 2015

    @copumpkin
    MemberAuthor

    Sorry, I'll reopen this once the new darwin stdenv is alive, since the way security works will likely change.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug6.topic: haskell9.needs: reporter feedback

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions