{ stdenv, fetchurl, perl }:
stdenv.mkDerivation rec {
  version = "2.18.1";
  name = "checkbashisms-${version}";

  src = fetchurl {
    url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.xz";
    sha256 = "1yaygfzv5jzvcbahz6sdfnzhch9mxgsrlsym2ad62nk0svsnp24n";
  };

  buildInputs = [ perl ];

  # The link returns directly the script. No need for unpacking
  unpackPhase = "true";

  installPhase = ''
    install -D -m755 $src $out/bin/checkbashisms
  '';

  meta = {
    homepage = https://sourceforge.net/projects/checkbaskisms/;
    description = "Check shell scripts for non-portable syntax";
    license = stdenv.lib.licenses.gpl2;
    platforms = stdenv.lib.platforms.unix;
  };
}

{ stdenv, fetchurl, perl }:
stdenv.mkDerivation rec {
  version = "2.0.0.2";
  name = "checkbashisms-${version}";

  src = fetchurl {
    url = "mirror://sourceforge/project/checkbaskisms/${version}/checkbashisms";
    sha256 = "1vm0yykkg58ja9ianfpm3mgrpah109gj33b41kl0jmmm11zip9jd";
  };

  buildInputs = [ perl ];

  # The link returns directly the script. No need for unpacking
  unpackPhase = "true";

  installPhase = ''
    install -D -m755 $src $out/bin/checkbashisms
  '';

  meta = {
    homepage = https://sourceforge.net/projects/checkbaskisms/;
    description = "Check shell scripts for non-portable syntax";
    license = stdenv.lib.licenses.gpl2;
    platforms = stdenv.lib.platforms.unix;
  };
}

Revert "checkbashism: 2.0.0.2 -> 2.18.1"
Revert "checkbashism: 2.0.0.2 -> 2.18.1"

This reverts commit c4ac43a20ccf6a53587e3a5b5d6f2c87e4a9de5c.

See https://github.com/NixOS/nixpkgs/pull/38102.
