Skip to content

Conversation

@peterbecich
Copy link
Member

@peterbecich peterbecich commented Feb 11, 2022


nix-shell builds the project successfully in GitHub Actions and locally:

 nix-shell --pure --run "cabal update && cabal build all --enable-tests"    
...
Downloading the latest package list from hackage.haskell.org
Updated package list of hackage.haskell.org to the index-state 2022-02-13T21:11:53Z
To revert to previous state run:
    cabal v2-update 'hackage.haskell.org,2022-02-13T18:44:13Z'
Resolving dependencies...
Up to date

@peterbecich peterbecich force-pushed the update-nix-shell branch 9 times, most recently from 1738c29 to cb097c5 Compare February 11, 2022 05:28
@peterbecich peterbecich marked this pull request as ready for review February 12, 2022 02:36
@gbaz
Copy link
Contributor

gbaz commented Mar 24, 2022

Why is nix/sources.nix checked in here? Its a big autogenerated file -- I confess I'm not super familiar with this stuff, but its a bit weird to me that such a file would need to be checked in.

@peterbecich
Copy link
Member Author

peterbecich commented Mar 26, 2022

I can delete the Niv https://github.com/nmattia/niv stuff and update the Nix channel manually if you prefer.

A.f.a.i.k. Niv currently requires the nix/sources.nix file. It was generated by niv init. This is an open issue about getting rid of this file: nmattia/niv#272

In this PR, shell.nix imports nix/sources.nix and fails without it:

nix-shell --pure
error: getting status of '.../nix/sources.nix': No such file or directory
(use '--show-trace' to show detailed location information)

I could inline sources.nix into shell.nix somehow but this would go against the Niv documentation. Probably better to just not use Niv in this case.


Regardless of Niv, the Nix channel is updated and brotli is provided now; readme updated: https://github.com/haskell/hackage-server/pull/1002/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L24

@peterbecich
Copy link
Member Author

I see the "Test nix-shell" GitHub Action takes a long time. I think it does not cache. More discussion about this: actions/cache#749 (comment)
I could try the solution discussed there, or wait for this to possibly be incorporated into https://github.com/cachix/install-nix-action

@gbaz
Copy link
Contributor

gbaz commented Mar 28, 2022

if you hold off on the niv stuff i'll merge the basic fixes.

url = "https://github.com/NixOS/nixpkgs/archive/70e001f35cc363eb789ea0a04eff11b86c440ba3.tar.gz";
sha256 = "1mrhbcfa8kkx1qnax8xh41grinqiycl56wlws5vvrli8w0pzgl1r";
# master on 2022-05-14
url = "https://github.com/NixOS/nixpkgs/archive/1d370bd07399fb52cea6badfbffbc90ac9b0f8f0.tar.gz";
Copy link
Member Author

Choose a reason for hiding this comment

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

@peterbecich peterbecich changed the title update nix-shell sources; use niv update nix-shell sources; GitHub Actions for nix-shell May 15, 2022
@peterbecich
Copy link
Member Author

@gbaz , done, sorry for the delay

@gbaz gbaz merged commit 358d34f into haskell:master May 15, 2022
@peterbecich peterbecich deleted the update-nix-shell branch May 15, 2022 16:56
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.

2 participants