tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
micro: get rid of rec
Anderson Torres
2 years ago
c54fb7ba
e439f7ea
+58
-54
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
mi
micro
package.nix
+58
-54
pkgs/by-name/mi/micro/package.nix
···
19
19
else stdenv.isLinux
20
20
}:
21
21
22
22
-
buildGoModule rec {
23
23
-
pname = "micro";
24
24
-
version = "2.0.13";
22
22
+
let
23
23
+
self = buildGoModule {
24
24
+
pname = "micro";
25
25
+
version = "2.0.13";
25
26
26
26
-
src = fetchFromGitHub {
27
27
-
owner = "zyedidia";
28
28
-
repo = "micro";
29
29
-
rev = "v${version}";
30
30
-
hash = "sha256-fe+7RkUwCveBk14bYzg5uLGOqTVVJsrqixBQhCS79hY=";
31
31
-
};
27
27
+
src = fetchFromGitHub {
28
28
+
owner = "zyedidia";
29
29
+
repo = "micro";
30
30
+
rev = "v${self.version}";
31
31
+
hash = "sha256-fe+7RkUwCveBk14bYzg5uLGOqTVVJsrqixBQhCS79hY=";
32
32
+
};
32
33
33
33
-
vendorHash = "sha256-ePhObvm3m/nT+7IyT0W6K+y+9UNkfd2kYjle2ffAd9Y=";
34
34
+
vendorHash = "sha256-ePhObvm3m/nT+7IyT0W6K+y+9UNkfd2kYjle2ffAd9Y=";
34
35
35
35
-
nativeBuildInputs = [ installShellFiles makeWrapper ];
36
36
+
nativeBuildInputs = [ installShellFiles makeWrapper ];
36
37
37
37
-
outputs = [ "out" "man" ];
38
38
+
outputs = [ "out" "man" ];
38
39
39
39
-
subPackages = [ "cmd/micro" ];
40
40
+
subPackages = [ "cmd/micro" ];
40
41
41
41
-
ldflags = let t = "github.com/zyedidia/micro/v2/internal"; in [
42
42
-
"-s"
43
43
-
"-w"
44
44
-
"-X ${t}/util.Version=${version}"
45
45
-
"-X ${t}/util.CommitHash=${src.rev}"
46
46
-
];
42
42
+
ldflags = let t = "github.com/zyedidia/micro/v2/internal"; in [
43
43
+
"-s"
44
44
+
"-w"
45
45
+
"-X ${t}/util.Version=${self.version}"
46
46
+
"-X ${t}/util.CommitHash=${self.src.rev}"
47
47
+
];
47
48
48
48
-
strictDeps = true;
49
49
+
strictDeps = true;
49
50
50
50
-
preBuild = ''
51
51
-
GOOS= GOARCH= go generate ./runtime
51
51
+
preBuild = ''
52
52
+
GOOS= GOARCH= go generate ./runtime
52
53
'';
53
54
54
54
-
postInstall = ''
55
55
-
installManPage assets/packaging/micro.1
56
56
-
install -Dm444 assets/packaging/micro.desktop $out/share/applications/micro.desktop
57
57
-
install -Dm644 assets/micro-logo-mark.svg $out/share/icons/hicolor/scalable/apps/micro.svg
55
55
+
postInstall = ''
56
56
+
installManPage assets/packaging/micro.1
57
57
+
install -Dm444 assets/packaging/micro.desktop $out/share/applications/micro.desktop
58
58
+
install -Dm644 assets/micro-logo-mark.svg $out/share/icons/hicolor/scalable/apps/micro.svg
58
59
'';
59
60
60
60
-
postFixup = let
61
61
-
clipboardPackages =
62
62
-
lib.optionals withXclip [ xclip ] ++ lib.optionals withWlClipboard [ wl-clipboard ];
63
63
-
in
64
64
-
lib.optionalString (withXclip || withWlClipboard)
65
65
-
''
66
66
-
wrapProgram "$out/bin/micro" \
67
67
-
--prefix PATH : "${lib.makeBinPath clipboardPackages}"
68
68
-
'';
61
61
+
postFixup = let
62
62
+
clipboardPackages =
63
63
+
lib.optionals withXclip [ xclip ] ++ lib.optionals withWlClipboard [ wl-clipboard ];
64
64
+
in
65
65
+
lib.optionalString (withXclip || withWlClipboard)
66
66
+
''wrapProgram "$out/bin/micro" \
67
67
+
--prefix PATH : "${lib.makeBinPath clipboardPackages}"
68
68
+
'';
69
69
70
70
-
passthru = {
71
71
-
tests = {
72
72
-
expect = callPackage ./test-with-expect.nix { };
70
70
+
passthru = {
71
71
+
tests = {
72
72
+
expect = callPackage ./test-with-expect.nix {
73
73
+
micro = self;
74
74
+
};
75
75
+
};
73
76
};
74
74
-
};
75
77
76
76
-
meta = {
77
77
-
homepage = "https://micro-editor.github.io";
78
78
-
description = "Modern and intuitive terminal-based text editor";
79
79
-
longDescription = ''
80
80
-
micro is a terminal-based text editor that aims to be easy to use and
81
81
-
intuitive, while also taking advantage of the capabilities of modern
82
82
-
terminals.
78
78
+
meta = {
79
79
+
homepage = "https://micro-editor.github.io";
80
80
+
description = "Modern and intuitive terminal-based text editor";
81
81
+
longDescription = ''
82
82
+
micro is a terminal-based text editor that aims to be easy to use and
83
83
+
intuitive, while also taking advantage of the capabilities of modern
84
84
+
terminals.
83
85
84
84
-
As its name indicates, micro aims to be somewhat of a successor to the
85
85
-
nano editor by being easy to install and use. It strives to be enjoyable
86
86
-
as a full-time editor for people who prefer to work in a terminal, or
87
87
-
those who regularly edit files over SSH.
86
86
+
As its name indicates, micro aims to be somewhat of a successor to the
87
87
+
nano editor by being easy to install and use. It strives to be enjoyable
88
88
+
as a full-time editor for people who prefer to work in a terminal, or
89
89
+
those who regularly edit files over SSH.
88
90
'';
89
89
-
license = lib.licenses.mit;
90
90
-
mainProgram = "micro";
91
91
-
maintainers = with lib.maintainers; [ AndersonTorres ];
91
91
+
license = lib.licenses.mit;
92
92
+
mainProgram = "micro";
93
93
+
maintainers = with lib.maintainers; [ AndersonTorres ];
94
94
+
};
92
95
};
93
93
-
}
96
96
+
in
97
97
+
self