tsoding / HyperNerd

Total Surveillance Automatic Ban Machine for Twitch and Discord
https://www.twitch.tv/tsoding
MIT License
146 stars 16 forks source link

Pin nixpkgs, and various libraries to allow a reproducibele shell #798

Closed jappeace closed 5 years ago

jappeace commented 5 years ago

in the default.nix import { } is used, this uses the host os'es nixpkgs rather than selecting a specific one. In my case this would pull in various erronious libraries. It also couldn't find louis or discord-haskell so I also added those. Pinning this down should make the libraries the same for anyone using this.

Most of this code is generated by cabal2nix, I just hooked it together and played with revisions untill I got a working build.

Cheers. - jappiejappie.

rexim commented 5 years ago

@jappeace I don't understand what's the purpose of this. What exactly is the problem you are solving? Do you want to be able to build HyperNerd using only nixpkgs?

I just made default.nix give me native dependencies like zlib/openssl and I just build everything using only cabal https://github.com/tsoding/HyperNerd#nixos Had way too many problems with nixpkgs.

jappeace commented 5 years ago

I had problems with dependency resoultion, for example discord haskell got pulled in to the newest version on hackage. Which was incompatible with your code.

These changes create a shell with the exact version I believe you're using by pinning them to the git reversion used by upstream. For example this is the 0.8.3 release as tracked by git for discord haskell. And this pins all of the nixpkgs dependencies to a version I guessed you were using based on dates.

rexim commented 5 years ago

@jappeace this doesn't clarify anything to me. Please provide detailed steps on how you try to build the project.

jappeace commented 5 years ago

Hi,

I followed the instructions in the readme to the letter now, being sure of myself I'd encounter an error, but alas, I must have deviated at some point wasting a bunch of my own time and some of yours.

I'm sorry.