lucc / nvimpager

Use nvim as a pager to view manpages, diffs, etc with nvim's syntax highlighting
Other
396 stars 20 forks source link

Install fails on nixos (`0.11.0`) #86

Closed thenbe closed 1 year ago

thenbe commented 1 year ago

Hi. One of the tests fail when installing 0.11.0 on a nixOS system.

Log

$ nix log /nix/store/hklmxaw1l61m2xdmka3n5zjzbzb5rig0-nvimpager-0.11.0.drv | cat
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/lczpm66faxaygvgnwjm5wknpki5pan24-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
patching script interpreter paths in nvimpager
nvimpager: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/j80wcbm6bb1nsqsgmniq43rg980p27q9-bash-5.2-p15/bin/bash"
build flags: SHELL=/nix/store/j80wcbm6bb1nsqsgmniq43rg980p27q9-bash-5.2-p15/bin/bash PREFIX=\$\(out\) nvimpager.configured nvimpager.1
sed 's#^RUNTIME=._$#RUNTIME='"'/nix/store/svvb2yjak7da12dwdzmjzfpx2dqpc967-nvimpager-0.11.0/share/nvimpager/runtime'"'#;s#version=._$#version=0.11.0#' < nvimpager > nvimpager.configured
chmod +x nvimpager.configured
sed '1s/$/ "nvimpager 0.11.0"/' nvimpager.md | scdoc > nvimpager.1
@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
Script started, output log file is 'typescript'.
●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●◼●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
128 successes / 1 failure / 0 errors / 0 pending : 0.787097 seconds

Failure → test/nvimpager_spec.lua @ 241
pager mode starts up and quits correctly
./test/helpers.lua:44: command failed
Expected objects to be equal.
Passed in:
(string) '1
'
Expected:
(string) '0
'
Script done.

System info

$  nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.27, NixOS, 23.05 (Stoat), 23.05pre481202.3e313808bd2`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"nixos, nixos-unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Workaround

Install version 0.10.0

nix-shell -p nvimpager -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/407f8825b321617a38b86a4d9be11fd76d513da2.tar.gz
lucc commented 1 year ago

For me nix build github:lucc/nvimpager works as expected. I think you are doing nix build nixpkgs#nvimpager which also fails for me, so this issue should is for nixos/nixpkgs and not this repo (I am maintaining nvimpager there, so you at least reached the correct person).

lucc commented 1 year ago

v0.12 should fix this: https://github.com/NixOS/nixpkgs/pull/231017