Skip to content

source-repository-package pins and shellFor #1367

Open
@dhess

Description

@dhess

We've just added a couple of source-repository-package pins in our cabal.project to work around a few upstream issues, as I suspect many of you may have done recently:

-- https://github.com/vincenthz/hs-memory/issues/86
-- https://github.com/haskell-infra/hackage-trustees/issues/330#issuecomment-1019507291
source-repository-package
  type: git
  location: https://github.com/tfausak/hs-memory
  tag: 3cf661a
  --sha256: 06y4xyigajhdcd59dgwasv49yr95869q3p74a441yls5vb86v28c

-- https://github.com/haskell-foundation/foundation/pull/555
source-repository-package
    type: git
    location: https://github.com/TomMD/foundation
    tag: 0bb195e
    subdir: foundation basement
    --sha256: 1rwy3qxrf8zxycfksidwrffqbazacchqx19w5q1rvdvh7ab6wd75

Our Nix builds work fine with this, but we noticed that our project's shellFor doesn't include these dependencies, which leads to two issues:

  1. Cabal ends up building a lot of stuff locally.
  2. If the developer hasn't run cabal update (which we otherwise don't need to do), the shell build fails outright.

It turns out I had pointed this out 2 years ago when I asked about using Nix for overrides: #510 I just forgot about it in the interim 😂

Anyway, is there something I can add to our project's haskell.nix config so that shellFor includes these dependencies? They're obviously being built by our nix-build builds as those are working as expected, and we'd obviously like to leverage our binary cache, especially considering how many packages are affected by these particular pins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    preservedKeep stale bot away

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions