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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.0 KiB
Nix
Raw Normal View History

2022-02-27 15:55:03 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, callPackage }:
2018-01-06 19:49:58 +00:00
2020-10-07 04:20:00 +00:00
buildGoModule rec {
pname = "micro";
2021-08-07 01:15:10 +00:00
version = "2.0.10";
2018-01-06 19:49:58 +00:00
src = fetchFromGitHub {
owner = "zyedidia";
2020-06-19 16:53:34 +00:00
repo = pname;
2018-01-06 19:49:58 +00:00
rev = "v${version}";
2021-08-07 01:15:10 +00:00
sha256 = "sha256-hVFmViwGXuYVAKaCkzK/LHjCi8AtLu0tsPpT61glxys=";
2018-01-06 19:49:58 +00:00
};
2020-06-22 13:13:19 +00:00
nativeBuildInputs = [ installShellFiles ];
2018-01-06 19:49:58 +00:00
subPackages = [ "cmd/micro" ];
2021-08-07 01:15:10 +00:00
vendorSha256 = "sha256-YcAKl4keizkbgQLAZGiCG3CGpNTNad8EvOJEXLX2s0s=";
2020-04-18 17:26:43 +00:00
2021-08-26 06:45:51 +00:00
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 19:49:58 +00:00
2020-06-22 13:13:19 +00:00
postInstall = ''
2020-10-07 04:20:00 +00:00
installManPage assets/packaging/micro.1
install -Dt $out/share/applications assets/packaging/micro.desktop
2020-06-22 13:13:19 +00:00
'';
2022-02-27 15:55:03 +00:00
passthru.tests.expect = callPackage ./test-with-expect.nix {};
2020-10-07 04:20:00 +00:00
meta = with 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 ];
};
}