# Pastebin ukRt6y2O { nixpkgs ? import { } }: let inherit (nixpkgs) pkgs; discoSrc = pkgs.fetchFromGitHub { owner = "disco-lang"; repo = "disco"; rev = "70c360aeffdec08f2ad1eb70b2b051738f76f389"; sha256 = "sha256-9YO9LVRCECUkYhn7poLQk26tvawfuX6g+o+kVuqul8c="; }; haskellPackages = pkgs.haskellPackages.override { overrides = final: prev: with pkgs.haskell.lib; { # This is the default way to pull a specific package version from Hackage. # # Unfortunately, each nixpkgs version contains a pointer to a # specific snapshot of all-cabal-hashes, and if the package is # too new it may be absent from that snapshot. In such cases, # you need to use callHackageDirect, below. polysemy = prev.callHackage "polysemy" "1.6.0.0" { }; #polysemy = prev.callHackageDirect { # pkg = "polysemy"; # ver = "1.6.0.0"; # # replace with actual hash generated by nix # sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; #} { }; # polysemy-plugin-0.4.1.1 is not in the all-cabal-hashes pointed # to by my nixpkgs, so I use callHackageDirect here. I do not # know what nixpkgs revision repl.it uses. polysemy-plugin = prev.callHackageDirect { pkg = "polysemy-plugin"; ver = "0.4.1.1"; sha256 = "sha256-96NAVVy25HPLnCNtD7EYsaGnoZe2YrEdlWaHGGtX/iU="; } { }; # Sometimes a package is erroneously marked broken. Here, we # have to unmark it broken and then jailbreak it so that it # ignores build-depends bounds. # # If it is marked broken and it shouldn't be, then PR # pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml # in nixpkgs. Only do this if the following command builds: # # NIXPKGS_ALLOW_BROKEN=1 nix-build -A haskellPackages.foo # # (This breakage is more than that - we had to jailbreak its # dependencies - so we shouldn't PR.) polysemy-zoo = doJailbreak (unmarkBroken prev.polysemy-zoo); }; }; # Test suite fails inside nix build env disco = pkgs.haskell.lib.dontCheck ( haskellPackages.callCabal2nix "disco" discoSrc { } ); in pkgs.mkShell { name = "disco"; buildInputs = [ disco ]; }