haskell-nix / hnix-store

Haskell implementation of the Nix store
Apache License 2.0
83 stars 23 forks source link

Forward port path filtering part from #72 #271

Open sorki opened 8 months ago

sorki commented 8 months ago

The PR also finishes PathFilter which is now stubbed/abstracted and wrapped in https://github.com/haskell-nix/hnix-store/blob/master/hnix-store-core/src/System/Nix/Store/Types.hs#L16-L18

This requires some -nar changes, the streamNarIO should keep its signature but call a prime version like streamNarIOWithFilter that would also accept PathFilter. The path filter is (un)used in -readonly https://github.com/haskell-nix/hnix-store/blob/master/hnix-store-readonly/src/System/Nix/Store/ReadOnly.hs#L103-L106 and probably should be added to remote as well but that doesn't need to be handled as part of this.

@squalus @vaibhavsagar wanna take a stab at this? If so assign yourself so there's no duplication of work.

I'll tackle the tranformer part of the PR in the meantime.