Last active
December 15, 2021 04:41
-
-
Save Gabriella439/e82239131b6f2360f350e7bf340c7cc0 to your computer and use it in GitHub Desktop.
How to build ghcid using nixpkgs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
nixpkgs = builtins.fetchTarball { | |
url = "https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz"; | |
sha256 = "0q7rnlp1djxc9ikj89c0ifzihl4wfvri3q1bvi75d2wrz844b4lq"; | |
}; | |
compiler = "ghc921"; | |
overlay = pkgsNew: pkgsOld: { | |
ghcid = pkgsNew.haskell.packages."${compiler}".ghcid; | |
haskell = pkgsOld.haskell // { | |
packages = pkgsOld.haskell.packages // { | |
"${compiler}" = pkgsOld.haskell.packages."${compiler}".override (old: { | |
overrides = | |
pkgsNew.lib.composeExtensions (old.overrides or (_: _: { })) | |
(haskellPackagesNew: haskellPackagesOld: { | |
mkDerivation = args: haskellPackagesOld.mkDerivation (args // { | |
doCheck = false; | |
doHaddock = false; | |
}); | |
ghcid = | |
pkgsNew.haskell.lib.overrideCabal | |
haskellPackagesOld.ghcid | |
(_: { enableSeparateBinOutput = false; }); | |
terminal-size = | |
pkgsNew.haskell.lib.overrideCabal | |
haskellPackagesOld.terminal-size | |
(_: { | |
patches = pkgsNew.fetchpatch { | |
url = "https://patch-diff.githubusercontent.com/raw/biegunka/terminal-size/pull/17.patch"; | |
sha256 = "0fjafnhjb42cfa12pqpqss9bmy67fpxpsm0hv5q775pxhpmfdgsg"; | |
}; | |
}); | |
}); | |
}); | |
}; | |
}; | |
}; | |
pkgs = import nixpkgs { config = { }; overlays = [ overlay ]; }; | |
in | |
pkgs.ghcid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment