lf: fix panic error on systems where user is not in /etc/passwd (#196614)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

authored by Gaétan Lepage Sandro and committed by GitHub 1d3d61b3 1069eaec

+10 -1
+10 -1
pkgs/applications/file-managers/lf/default.nix
··· 1 - { buildGoModule, fetchFromGitHub, lib, installShellFiles }: 2 3 buildGoModule rec { 4 pname = "lf"; ··· 16 nativeBuildInputs = [ installShellFiles ]; 17 18 ldflags = [ "-s" "-w" "-X main.gVersion=r${version}" ]; 19 20 postInstall = '' 21 install -D --mode=444 lf.desktop $out/share/applications/lf.desktop
··· 1 + { lib 2 + , stdenv 3 + , buildGoModule 4 + , fetchFromGitHub 5 + , installShellFiles 6 + }: 7 8 buildGoModule rec { 9 pname = "lf"; ··· 21 nativeBuildInputs = [ installShellFiles ]; 22 23 ldflags = [ "-s" "-w" "-X main.gVersion=r${version}" ]; 24 + 25 + # Force the use of the pure-go implementation of the os/user library. 26 + # Relevant issue: https://github.com/gokcehan/lf/issues/191 27 + tags = lib.optionals (!stdenv.isDarwin) [ "osusergo" ]; 28 29 postInstall = '' 30 install -D --mode=444 lf.desktop $out/share/applications/lf.desktop