Skip to content

Instantly share code, notes, and snippets.

@frafra
Last active October 21, 2024 15:11
Show Gist options
  • Save frafra/7948ef455096418960618cc2628c5f9e to your computer and use it in GitHub Desktop.
Save frafra/7948ef455096418960618cc2628c5f9e to your computer and use it in GitHub Desktop.
renv failure in nix-shell with pre-commit: libxml2.so.2: cannot open shared object file
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.3
hooks:
- id: style-files
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSEnv {
name = "precommit-rstyler";
targetPkgs = pkgs: with pkgs; [
pre-commit
git
R
pkg-config
gnumake
libxml2.dev
];
multiPkgs = pkgs: with pkgs; [
libxml2
];
runScript = "bash";
}).env
# nix-shell
export PATH="/bin"
pre-commit run -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment