2021-04-19 02:56:12 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, installShellFiles }:
|
2015-03-17 23:23:20 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-04-19 02:56:12 +00:00
|
|
|
version = "2.21.1";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "checkbashisms";
|
2015-03-17 23:23:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-04-19 02:56:12 +00:00
|
|
|
url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.xz";
|
|
|
|
hash = "sha256-1ZbIiUrFd38uMVLy7YayLLm5RrmcovsA++JTb8PbTFI=";
|
2015-03-17 23:23:20 +00:00
|
|
|
};
|
|
|
|
|
2021-04-19 02:56:12 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2017-05-14 07:15:30 +00:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
|
2021-04-19 02:56:12 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
2015-03-17 23:23:20 +00:00
|
|
|
|
2021-04-19 02:56:12 +00:00
|
|
|
substituteInPlace ./scripts/checkbashisms.pl \
|
|
|
|
--replace '###VERSION###' "$version"
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
2015-03-17 23:23:20 +00:00
|
|
|
installPhase = ''
|
2021-04-19 02:56:12 +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
|
2015-03-17 23:23:20 +00:00
|
|
|
'';
|
2016-08-02 16:19:16 +00:00
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://sourceforge.net/projects/checkbaskisms/";
|
2016-08-02 16:19:16 +00:00
|
|
|
description = "Check shell scripts for non-portable syntax";
|
2021-04-19 02:56:12 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [ kaction ];
|
2021-01-23 12:26:19 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2016-08-02 16:19:16 +00:00
|
|
|
};
|
2015-03-17 23:23:20 +00:00
|
|
|
}
|