3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/editors/micro/default.nix

41 lines
939 B
Nix
Raw Normal View History

2020-06-22 14:13:19 +01:00
{ stdenv, buildGoPackage, fetchFromGitHub, installShellFiles }:
2018-01-06 19:49:58 +00:00
2020-06-22 14:13:19 +01:00
buildGoPackage rec {
pname = "micro";
2020-06-19 17:53:34 +01:00
version = "2.0.5";
2018-01-06 19:49:58 +00:00
goPackagePath = "github.com/zyedidia/micro";
src = fetchFromGitHub {
owner = "zyedidia";
2020-06-19 17:53:34 +01:00
repo = pname;
2018-01-06 19:49:58 +00:00
rev = "v${version}";
2020-06-19 17:53:34 +01:00
sha256 = "12fyyax1mr0n82s5yhmk90iyyzbh32rppkkpj37c25pal73czdhc";
2018-01-06 19:49:58 +00:00
fetchSubmodules = true;
};
2020-06-22 14:13:19 +01:00
nativeBuildInputs = [ installShellFiles ];
2018-01-06 19:49:58 +00:00
subPackages = [ "cmd/micro" ];
2020-06-19 17:53:34 +01:00
buildFlagsArray = let t = "${goPackagePath}/internal/util"; in ''
-ldflags=
-X ${t}.Version=${version}
-X ${t}.CommitHash=${src.rev}
'';
2020-04-18 18:26:43 +01:00
goDeps = ./deps.nix;
2018-01-06 19:49:58 +00:00
2020-06-22 14:13:19 +01:00
postInstall = ''
installManPage $src/assets/packaging/micro.1
'';
2018-01-06 19:49:58 +00:00
meta = with stdenv.lib; {
homepage = "https://micro-editor.github.io";
2018-01-06 19:49:58 +00:00
description = "Modern and intuitive terminal-based text editor";
license = licenses.mit;
maintainers = with maintainers; [ dtzWill ];
};
}