nixpkgs/pkgs/development/tools/misc/checkbashisms/default.nix

40 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, perl, installShellFiles }:
2015-03-17 23:23:20 +00:00
stdenv.mkDerivation rec {
version = "2.21.1";
pname = "checkbashisms";
2015-03-17 23:23:20 +00:00
src = fetchurl {
url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.xz";
hash = "sha256-1ZbIiUrFd38uMVLy7YayLLm5RrmcovsA++JTb8PbTFI=";
2015-03-17 23:23:20 +00:00
};
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ perl ];
buildPhase = ''
runHook preBuild
2015-03-17 23:23:20 +00:00
substituteInPlace ./scripts/checkbashisms.pl \
--replace '###VERSION###' "$version"
runHook postBuild
'';
2015-03-17 23:23:20 +00:00
installPhase = ''
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
'';
meta = {
homepage = "https://sourceforge.net/projects/checkbaskisms/";
description = "Check shell scripts for non-portable syntax";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ kaction ];
platforms = lib.platforms.unix;
};
2015-03-17 23:23:20 +00:00
}