9 # Remove them as soon as possible
11 withWlClipboard ? null,
16 self = buildGoModule {
20 src = fetchFromGitHub {
23 rev = "v${self.version}";
24 hash = "sha256-avLVl6mn0xKgIy0BNnPZ8ypQhn8Ivj7gTgWbebDSjt0=";
27 vendorHash = "sha256-ePhObvm3m/nT+7IyT0W6K+y+9UNkfd2kYjle2ffAd9Y=";
29 nativeBuildInputs = [ installShellFiles ];
36 subPackages = [ "cmd/micro" ];
40 t = "github.com/zyedidia/micro/v2/internal";
45 "-X ${t}/util.Version=${self.version}"
46 "-X ${t}/util.CommitHash=${self.src.rev}"
52 GOOS= GOARCH= go generate ./runtime
56 installManPage assets/packaging/micro.1
57 install -Dm444 assets/packaging/micro.desktop $out/share/applications/micro.desktop
58 install -Dm644 assets/micro-logo-mark.svg $out/share/icons/hicolor/scalable/apps/micro.svg
62 tests = lib.packagesFromDirectoryRecursive {
66 wrapper = callPackage ./wrapper.nix { micro = self; };
70 homepage = "https://micro-editor.github.io";
71 changelog = "https://github.com/zyedidia/micro/releases/";
72 description = "Modern and intuitive terminal-based text editor";
74 micro is a terminal-based text editor that aims to be easy to use and
75 intuitive, while also taking advantage of the capabilities of modern
78 As its name indicates, micro aims to be somewhat of a successor to the
79 nano editor by being easy to install and use. It strives to be enjoyable
80 as a full-time editor for people who prefer to work in a terminal, or
81 those who regularly edit files over SSH.
83 license = lib.licenses.mit;
84 mainProgram = "micro";
85 maintainers = with lib.maintainers; [
92 lib.warnIf (withXclip != null || withWlClipboard != null || withWlclip != null) ''
93 The options `withXclip`, `withWlClipboard`, `withWlclip` were removed. If
94 you are seeking for clipboard support, please consider the following
96 - `micro-with-wl-clipboard`