nixpkgs/pkgs/applications/editors/micro/default.nix
2020-06-19 19:53:34 +03:00

35 lines
800 B
Nix

{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "micro";
version = "2.0.5";
goPackagePath = "github.com/zyedidia/micro";
src = fetchFromGitHub {
owner = "zyedidia";
repo = pname;
rev = "v${version}";
sha256 = "12fyyax1mr0n82s5yhmk90iyyzbh32rppkkpj37c25pal73czdhc";
fetchSubmodules = true;
};
subPackages = [ "cmd/micro" ];
buildFlagsArray = let t = "${goPackagePath}/internal/util"; in ''
-ldflags=
-X ${t}.Version=${version}
-X ${t}.CommitHash=${src.rev}
'';
goDeps = ./deps.nix;
meta = with stdenv.lib; {
homepage = "https://micro-editor.github.io";
description = "Modern and intuitive terminal-based text editor";
license = licenses.mit;
maintainers = with maintainers; [ dtzWill ];
};
}