lf: 11 -> 12
And switch to buildGoModule.
This commit is contained in:
parent
9960ff9c83
commit
97d35b251b
@ -1,29 +1,26 @@
|
|||||||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
{ buildGoModule, fetchFromGitHub, lib }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoModule rec {
|
||||||
name = "lf-${version}";
|
name = "lf-${version}";
|
||||||
version = "11";
|
version = "12";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "gokcehan";
|
owner = "gokcehan";
|
||||||
repo = "lf";
|
repo = "lf";
|
||||||
rev = "r${version}";
|
rev = "r${version}";
|
||||||
sha256 = "13622sx6xmbm8gf38dn8y8mkfnlbpamg4hmzsy9jnzg4h8qbjm6b";
|
sha256 = "1pjydnwlc6mrnwz13s13c91nvjvb1ibwl944ppg8xq8dcy9b2cs4";
|
||||||
};
|
};
|
||||||
|
|
||||||
goPackagePath = "github.com/gokcehan/lf";
|
modSha256 = "14fvn8yjm9cnpsmzgxw2dypr3h8h36mxrbk7zma42w8rsp46jpz7";
|
||||||
goDeps = ./deps.nix;
|
|
||||||
|
|
||||||
# TODO: Setting buildFlags probably isn't working properly. I've tried a few
|
# TODO: Setting buildFlags probably isn't working properly. I've tried a few
|
||||||
# variants, e.g.:
|
# variants, e.g.:
|
||||||
# - buildFlags = "-ldflags \"-s -w -X 'main.gVersion=${version}'\"";
|
# - buildFlags = "-ldflags \"-s -w -X 'main.gVersion=${version}'\"";
|
||||||
# - buildFlags = "-ldflags \\\"-X ${goPackagePath}/main.gVersion=${version}\\\"";
|
# - buildFlags = "-ldflags \\\"-X ${goPackagePath}/main.gVersion=${version}\\\"";
|
||||||
|
|
||||||
# Override the build phase (to set buildFlags):
|
# Override the build phase (to set buildFlags):
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
runHook renameImports
|
runHook renameImports
|
||||||
cd go/src/${goPackagePath}
|
|
||||||
go install -ldflags="-s -w -X main.gVersion=r${version}"
|
go install -ldflags="-s -w -X main.gVersion=r${version}"
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
@ -32,7 +29,7 @@ buildGoPackage rec {
|
|||||||
install -D --mode=444 lf.1 $out/share/man/man1/lf.1
|
install -D --mode=444 lf.1 $out/share/man/man1/lf.1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "A terminal file manager written in Go and heavily inspired by ranger";
|
description = "A terminal file manager written in Go and heavily inspired by ranger";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
lf (as in "list files") is a terminal file manager written in Go. It is
|
lf (as in "list files") is a terminal file manager written in Go. It is
|
||||||
|
20
pkgs/tools/misc/lf/deps.nix
generated
20
pkgs/tools/misc/lf/deps.nix
generated
@ -1,20 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
goPackagePath = "github.com/nsf/termbox-go";
|
|
||||||
fetch = {
|
|
||||||
type = "git";
|
|
||||||
url = "https://github.com/nsf/termbox-go";
|
|
||||||
rev = "02980233997d87bbda048393d47b4d453f7a398d"; # master
|
|
||||||
sha256 = "1zxysi00bk7bv5ka6vn9dnzk5q9wjp0252cm3v6l2hbrcx7405zw";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
goPackagePath = "github.com/mattn/go-runewidth";
|
|
||||||
fetch = {
|
|
||||||
type = "git";
|
|
||||||
url = "https://github.com/mattn/go-runewidth";
|
|
||||||
rev = "3ee7d812e62a0804a7d0a324e0249ca2db3476d3"; # v0.0.4
|
|
||||||
sha256 = "00b3ssm7wiqln3k54z2wcnxr3k3c7m1ybyhb9h8ixzbzspld0qzs";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]
|
|
Loading…
x
Reference in New Issue
Block a user