Created
March 26, 2019 08:24
-
-
Save Jomik/041c6c6f2fb5062db0d39768eb64c68f to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
coc-nvim = let | |
pname = "coc-nvim"; | |
version = "0.0.61"; | |
src = fetchFromGitHub { | |
owner = "neoclide"; | |
repo = "coc.nvim"; | |
rev = "v${version}"; | |
sha256 = "1as2hb4kfq1m0nq7vp2ibkfq8n219ykr04qx4qadg97s7iky4yx4"; | |
}; | |
deps = pkgs.yarn2nix.mkYarnModules rec { | |
name = "${pname}-modules-${version}"; | |
packageJSON = src + "/package.json"; | |
yarnLock = src + "/yarn.lock"; | |
}; | |
in buildVimPluginFrom2Nix { | |
inherit version pname src; | |
patches = [ ./cocyarnlock.patch ]; | |
configurePhase = '' | |
mkdir -p node_modules | |
ln -s ${deps}/node_modules/* node_modules/ | |
ln -s ${deps}/node_modules/.bin node_modules/ | |
''; | |
postFixup = '' | |
substituteInPlace $target/autoload/coc/util.vim \ | |
--replace "'yarnpkg'" "'${pkgs.yarn}/bin/yarnpkg'" | |
substituteInPlace $target/autoload/health/coc.vim \ | |
--replace "'yarnpkg'" "'${pkgs.yarn}/bin/yarnpkg'" | |
''; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment