File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ lib ,
3
+ rustPlatform ,
4
+ fetchFromGitHub ,
5
+ pkg-config ,
6
+ installShellFiles ,
7
+ oniguruma ,
8
+ rust-jemalloc-sys ,
9
+ stdenv ,
10
+ } :
11
+ rustPlatform . buildRustPackage ( finalAttrs : {
12
+ pname = "mado" ;
13
+ version = "0.3.0" ;
14
+
15
+ src = fetchFromGitHub {
16
+ owner = "akiomik" ;
17
+ repo = "mado" ;
18
+ tag = "v${ finalAttrs . version } " ;
19
+ hash = "sha256-wAuV4w0dKfUbJVLTdp59/u4y13SPy3wkRfTlpvyE/zY=" ;
20
+ } ;
21
+
22
+ cargoHash = "sha256-fkalUnPkjjzhLaACh+WQP4tG5VzZ7wmrh5T1DVgSDwM=" ;
23
+
24
+ nativeBuildInputs = [
25
+ pkg-config
26
+ installShellFiles
27
+ ] ;
28
+
29
+ buildInputs = [
30
+ oniguruma
31
+ rust-jemalloc-sys
32
+ ] ;
33
+
34
+ env = {
35
+ RUSTONIG_SYSTEM_LIBONIG = true ;
36
+ } ;
37
+
38
+ postInstall = lib . optionalString ( stdenv . buildPlatform . canExecute stdenv . hostPlatform ) ''
39
+ installShellCompletion --cmd mado \
40
+ --bash <($out/bin/mado generate-shell-completion bash) \
41
+ --zsh <($out/bin/mado generate-shell-completion zsh) \
42
+ --fish <($out/bin/mado generate-shell-completion fish)
43
+ '' ;
44
+
45
+ checkFlags = [
46
+ # # seem to be slightly broken inside of the build sandbox
47
+ "--skip=check_empty_stdin_with_file"
48
+ "--skip=check_stdin"
49
+ "--skip=check_stdin_with_file"
50
+ "--skip=generate_shell_completion_invalid"
51
+ "--skip=unknown_command"
52
+ ] ;
53
+
54
+ meta = {
55
+ description = "Markdown linter written in Rust" ;
56
+ homepage = "https://github.com/akiomik/mado" ;
57
+ changelog = "https://github.com/akiomik/mado/blob/v${ finalAttrs . version } /CHANGELOG.md" ;
58
+ license = lib . licenses . asl20 ;
59
+ maintainers = with lib . maintainers ; [ jasonxue1 ] ;
60
+ mainProgram = "mado" ;
61
+ } ;
62
+ } )
You can’t perform that action at this time.
0 commit comments