2021-04-19 03:05:28 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-04-19 03:05:28 +00:00
|
|
|
version = "2.21.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "checkbashisms";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-04-19 03:05:28 +00:00
|
|
|
url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.xz";
|
|
|
|
hash = "sha256-1ZbIiUrFd38uMVLy7YayLLm5RrmcovsA++JTb8PbTFI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-19 03:05:28 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
2021-04-19 03:05:28 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-19 03:05:28 +00:00
|
|
|
substituteInPlace ./scripts/checkbashisms.pl \
|
|
|
|
--replace '###VERSION###' "$version"
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2021-04-19 03:05:28 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
installManPage scripts/$pname.1
|
|
|
|
installShellCompletion --bash --name $pname scripts/$pname.bash_completion
|
|
|
|
install -D -m755 scripts/$pname.pl $out/bin/$pname
|
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://sourceforge.net/projects/checkbaskisms/";
|
|
|
|
description = "Check shell scripts for non-portable syntax";
|
2021-04-19 03:05:28 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [ kaction ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|