Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11 39 lines 1.1 kB view raw
1{ lib, stdenv, fetchurl, perl, installShellFiles }: 2stdenv.mkDerivation rec { 3 version = "2.22.1"; 4 pname = "checkbashisms"; 5 6 src = fetchurl { 7 url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.xz"; 8 hash = "sha256-Nd1eYCnSe+NblujG44uKpvunkaITcdrC3g+M3uX+M9U="; 9 }; 10 11 nativeBuildInputs = [ installShellFiles ]; 12 buildInputs = [ perl ]; 13 14 buildPhase = '' 15 runHook preBuild 16 17 substituteInPlace ./scripts/checkbashisms.pl \ 18 --replace '###VERSION###' "$version" 19 20 runHook postBuild 21 ''; 22 installPhase = '' 23 runHook preInstall 24 25 installManPage scripts/$pname.1 26 installShellCompletion --bash --name $pname scripts/$pname.bash_completion 27 install -D -m755 scripts/$pname.pl $out/bin/$pname 28 29 runHook postInstall 30 ''; 31 32 meta = { 33 homepage = "https://sourceforge.net/projects/checkbaskisms/"; 34 description = "Check shell scripts for non-portable syntax"; 35 license = lib.licenses.gpl2Plus; 36 maintainers = with lib.maintainers; [ kaction ]; 37 platforms = lib.platforms.unix; 38 }; 39}