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

34 lines
984 B
Nix
Raw Normal View History

2020-10-07 06:20:00 +02:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2018-01-06 20:49:58 +01:00
2020-10-07 06:20:00 +02:00
buildGoModule rec {
pname = "micro";
2020-10-07 06:20:00 +02:00
version = "2.0.8";
2018-01-06 20:49:58 +01:00
src = fetchFromGitHub {
owner = "zyedidia";
2020-06-19 18:53:34 +02:00
repo = pname;
2018-01-06 20:49:58 +01:00
rev = "v${version}";
2020-10-07 06:20:00 +02:00
sha256 = "1b51fvc9hrjfl8acr3yybp66xfll7d43412qwi76wxwarn06gkci";
2018-01-06 20:49:58 +01:00
};
2020-06-22 15:13:19 +02:00
nativeBuildInputs = [ installShellFiles ];
2018-01-06 20:49:58 +01:00
subPackages = [ "cmd/micro" ];
2020-10-07 06:20:00 +02:00
vendorSha256 = "19iqvl63g9y6gkzfmv87rrgj4c4y6ngh467ss94rzrhaybj2b2d8";
2020-04-18 19:26:43 +02:00
2020-10-07 06:20:00 +02:00
buildFlagsArray = [ "-ldflags=-s -w -X github.com/zyedidia/micro/v2/internal/util.Version=${version} -X github.com/zyedidia/micro/v2/internal/util.CommitHash=${src.rev}" ];
2018-01-06 20:49:58 +01:00
2020-06-22 15:13:19 +02:00
postInstall = ''
2020-10-07 06:20:00 +02:00
installManPage assets/packaging/micro.1
install -Dt $out/share/applications assets/packaging/micro.desktop
2020-06-22 15:13:19 +02:00
'';
2020-10-07 06:20:00 +02:00
meta = with lib; {
homepage = "https://micro-editor.github.io";
2018-01-06 20:49:58 +01:00
description = "Modern and intuitive terminal-based text editor";
license = licenses.mit;
maintainers = with maintainers; [ dtzWill ];
};
}