2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lf";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "30";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gokcehan";
|
|
|
|
repo = "lf";
|
|
|
|
rev = "r${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-hlhmnkPm1x7uJMwUM/B02rXLffsXFbkxXYITKD3BERY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
vendorHash = "sha256-DYReTxH4SHnJERbiE6rOp5XqzN3NRbICt5iNeX8Jgt8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.gVersion=r${version}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
# 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" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -D --mode=444 lf.desktop $out/share/applications/lf.desktop
|
|
|
|
installManPage lf.1
|
2021-12-06 16:07:01 +00:00
|
|
|
installShellCompletion etc/lf.{bash,zsh,fish}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A terminal file manager written in Go and heavily inspired by ranger";
|
|
|
|
longDescription = ''
|
|
|
|
lf (as in "list files") is a terminal file manager written in Go. It is
|
|
|
|
heavily inspired by ranger with some missing and extra features. Some of
|
|
|
|
the missing features are deliberately omitted since it is better if they
|
|
|
|
are handled by external tools.
|
|
|
|
'';
|
|
|
|
homepage = "https://godoc.org/github.com/gokcehan/lf";
|
|
|
|
changelog = "https://github.com/gokcehan/lf/releases/tag/r${version}";
|
|
|
|
license = licenses.mit;
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|