nixpkgs/pkgs/applications/editors/micro/default.nix

35 lines
800 B
Nix
Raw Normal View History

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