about summary refs log tree commit diff
path: root/pkgs/applications/file-managers
diff options
context:
space:
mode:
authorGaƩtan Lepage <33058747+GaetanLepage@users.noreply.github.com>2022-10-27 13:57:22 +0200
committerGitHub <noreply@github.com>2022-10-27 13:57:22 +0200
commit1d3d61b344df147288b4598e870a5ce0c9b008b6 (patch)
treecfec4b0d50fc8d8c80c83a58525b800598b4e50e /pkgs/applications/file-managers
parent1069eaec350ee61a0b4fba0bdd06143f698cee95 (diff)
lf: fix panic error on systems where user is not in /etc/passwd (#196614)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/applications/file-managers')
-rw-r--r--pkgs/applications/file-managers/lf/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/applications/file-managers/lf/default.nix b/pkgs/applications/file-managers/lf/default.nix
index dd267e7ce4d07..faff303779506 100644
--- a/pkgs/applications/file-managers/lf/default.nix
+++ b/pkgs/applications/file-managers/lf/default.nix
@@ -1,4 +1,9 @@
-{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
+{ lib
+, stdenv
+, buildGoModule
+, fetchFromGitHub
+, installShellFiles
+}:
 
 buildGoModule rec {
   pname = "lf";
@@ -17,6 +22,10 @@ buildGoModule rec {
 
   ldflags = [ "-s" "-w" "-X main.gVersion=r${version}" ];
 
+  # Force the use of the pure-go implementation of the os/user library.
+  # Relevant issue: https://github.com/gokcehan/lf/issues/191
+  tags = lib.optionals (!stdenv.isDarwin) [ "osusergo" ];
+
   postInstall = ''
     install -D --mode=444 lf.desktop $out/share/applications/lf.desktop
     installManPage lf.1