summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/sh/shellharden/package.nix
blob: d6209dcd26b7c1b4a10a6fb8dc7ebc9c2f34e72f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  lib,
  rustPlatform,
  fetchFromGitHub,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "shellharden";
  version = "4.3.2";

  src = fetchFromGitHub {
    owner = "anordal";
    repo = "shellharden";
    rev = "v${finalAttrs.version}";
    sha256 = "sha256-brDqAxY36dl0xSDgzovq/mqvw3eRy+vkuLQozqPsDlc=";
  };

  cargoHash = "sha256-RE1k9G3xKTJ0F79bKrhgS+5O30eqVnA3iLCc+CHfS2Y=";

  postPatch = "patchShebangs moduletests/run";

  meta = {
    description = "Corrective bash syntax highlighter";
    mainProgram = "shellharden";
    longDescription = ''
      Shellharden is a syntax highlighter and a tool to semi-automate the
      rewriting of scripts to ShellCheck conformance, mainly focused on quoting.
    '';
    homepage = "https://github.com/anordal/shellharden";
    license = lib.licenses.mpl20;
    maintainers = [ ];
  };
})