diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/micro/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/editors/micro/default.nix | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/applications/editors/micro/default.nix b/nixpkgs/pkgs/applications/editors/micro/default.nix index 6a1ee5d196e..4a8c176f575 100644 --- a/nixpkgs/pkgs/applications/editors/micro/default.nix +++ b/nixpkgs/pkgs/applications/editors/micro/default.nix @@ -1,25 +1,35 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ stdenv, buildGoPackage, fetchFromGitHub, installShellFiles }: -buildGoPackage rec { +buildGoPackage rec { pname = "micro"; - version = "2.0.3"; + version = "2.0.5"; goPackagePath = "github.com/zyedidia/micro"; src = fetchFromGitHub { owner = "zyedidia"; - repo = "micro"; + repo = pname; rev = "v${version}"; - sha256 = "017m9kb3gfrgzd06f1nma1i3m5rb0hzpgdikb86lsyv8ik18y12z"; + sha256 = "12fyyax1mr0n82s5yhmk90iyyzbh32rppkkpj37c25pal73czdhc"; fetchSubmodules = true; }; + nativeBuildInputs = [ installShellFiles ]; + subPackages = [ "cmd/micro" ]; - buildFlagsArray = [ "-ldflags=" "-X ${goPackagePath}/internal/util.Version=${version}" ]; + buildFlagsArray = let t = "${goPackagePath}/internal/util"; in '' + -ldflags= + -X ${t}.Version=${version} + -X ${t}.CommitHash=${src.rev} + ''; goDeps = ./deps.nix; + postInstall = '' + installManPage $src/assets/packaging/micro.1 + ''; + meta = with stdenv.lib; { homepage = "https://micro-editor.github.io"; description = "Modern and intuitive terminal-based text editor"; |