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

Build Hoff in Nix #105

Merged
merged 5 commits into from
Apr 19, 2022
Merged

Build Hoff in Nix #105

merged 5 commits into from
Apr 19, 2022

Conversation

Riscky
Copy link

@Riscky Riscky commented Apr 19, 2022

In the past, we build Hoff in CI, on a Ubuntu 18.04 server.
We pushed the built apt package to our package repository.
We then ran the apt package on a 18.04 server, and life was good.

We then decided to limit access to our repository server from the outside, and as such we could not upload apt packages from CI.
We then decided to do our builds locally (see #101), and life seemed to be good again.

Then we discovered that something was amiss: the locally build packages did not run on the server.
Building Hoff locally on a 20.04 machine made it rely on glibc version 2.29, but the 18.04 server only has 20.04.

This PR tries to solve this problem once and for all by building with Nix.
The build is done in CI, and then pushed to Cachix.

Because of mismatch between the version of base16-bytestring pinned by Stack (0.1.1) and the version pinned by the github dependency in Nix (1.0), we had to upgrade the dependency.
Because of a changed function type, this leads to a few lines of changed code, and to the Stack builds being broken (see #106).

The other changed lines of Haskell code are because of packages in Nix not being in their expected location.

Copy link
Member

@maartenberg maartenberg left a comment

Choose a reason for hiding this comment

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

Some notes:

.semaphore/semaphore.yml Outdated Show resolved Hide resolved
.semaphore/semaphore.yml Outdated Show resolved Hide resolved
.semaphore/semaphore.yml Outdated Show resolved Hide resolved
.semaphore/semaphore.yml Outdated Show resolved Hide resolved
hoff.nix Outdated Show resolved Hide resolved
hoff.nix Show resolved Hide resolved
hoff.nix Outdated Show resolved Hide resolved
hoff.nix Outdated Show resolved Hide resolved
@Riscky Riscky requested a review from maartenberg April 19, 2022 11:20
@Riscky
Copy link
Author

Riscky commented Apr 19, 2022

@OpsBotPrime merge

@OpsBotPrime
Copy link

Pull request approved for merge by @Riscky, rebasing now.

@OpsBotPrime
Copy link

Rebased as c4c2e38, waiting for CI …

@OpsBotPrime OpsBotPrime merged commit c4c2e38 into master Apr 19, 2022
@OpsBotPrime OpsBotPrime deleted the build/nix branch April 19, 2022 11:50
@fatho fatho mentioned this pull request May 20, 2022
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.

3 participants