File tree Expand file tree Collapse file tree
pkgs/by-name/ni/nixfmt-rs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ rustPlatform ,
4+ fetchFromGitHub ,
5+ installShellFiles ,
6+ scdoc ,
7+ versionCheckHook ,
8+ nix-update-script ,
9+ nixfmt ,
10+ gitMinimal ,
11+ } :
12+
13+ rustPlatform . buildRustPackage ( finalAttrs : {
14+ pname = "nixfmt-rs" ;
15+ version = "0.2.0" ;
16+
17+ __structuredAttrs = true ;
18+ strictDeps = true ;
19+
20+ src = fetchFromGitHub {
21+ owner = "Mic92" ;
22+ repo = "nixfmt-rs" ;
23+ tag = finalAttrs . version ;
24+ hash = "sha256-eBVi22+EGMYWv2t/seoPqou8PuABxVcsWTFcrNYP6So=" ;
25+ } ;
26+
27+ cargoHash = "sha256-fadjOtfB8bFuhTN9mAmi2A526boW7Aje39IBjdxszok=" ;
28+
29+ nativeBuildInputs = [
30+ installShellFiles
31+ scdoc
32+ ] ;
33+
34+ postBuild = ''
35+ scdoc < docs/nixfmt.1.scd > nixfmt.1
36+ '' ;
37+
38+ postInstall = ''
39+ installManPage nixfmt.1
40+ '' ;
41+
42+ doInstallCheck = true ;
43+ nativeInstallCheckInputs = [ versionCheckHook ] ;
44+
45+ nativeCheckInputs = [
46+ gitMinimal
47+ nixfmt
48+ ] ;
49+
50+ passthru . updateScript = nix-update-script { } ;
51+
52+ meta = {
53+ changelog = "https://github.com/Mic92/nixfmt-rs/releases/tag/${ finalAttrs . version } " ;
54+ description = "Rust reimplementation of nixfmt that produces byte-identical output to the Haskell original" ;
55+ homepage = "https://github.com/Mic92/nixfmt-rs" ;
56+ license = lib . licenses . mpl20 ;
57+ maintainers = with lib . maintainers ; [
58+ drupol
59+ mic92
60+ ] ;
61+ mainProgram = "nixfmt" ;
62+ } ;
63+ } )
You can’t perform that action at this time.
0 commit comments