From 7bf0458cb6a018e03b88f9c2cf756a9212966ace Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Wed, 18 Mar 2015 00:23:20 +0100 Subject: [PATCH] Add checkbashisms package --- .../tools/misc/checkbashisms/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/tools/misc/checkbashisms/default.nix diff --git a/pkgs/development/tools/misc/checkbashisms/default.nix b/pkgs/development/tools/misc/checkbashisms/default.nix new file mode 100644 index 000000000000..259224aac5da --- /dev/null +++ b/pkgs/development/tools/misc/checkbashisms/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, perl }: +stdenv.mkDerivation rec { + inherit perl; + + name = "checkbashisms"; + version = "2.0.0.2"; + + src = fetchurl { + url = "mirror://sourceforge/project/checkbaskisms/${version}/${name}"; + sha256 = "1vm0yykkg58ja9ianfpm3mgrpah109gj33b41kl0jmmm11zip9jd"; + }; + + meta = { + homepage = http://sourceforge.net/projects/checkbaskisms/; + description = "Performs basic checks on shell scripts for the presence of non portable syntax."; + license = stdenv.lib.licenses.gpl2; + }; + + # The link returns directly the script. No need for unpacking + unpackPhase = "true"; + + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/checkbashisms + chmod 755 $out/bin/checkbashisms + ''; + + # Makes sure to point to the proper perl version + fixupPhase = '' + sed -e "s#/usr/bin/perl#$perl/bin/perl#" -i $out/bin/checkbashisms + ''; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index abb065689a68..b7c68b272b7b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -999,6 +999,8 @@ let biosdevname = callPackage ../tools/networking/biosdevname { }; + checkbashism = callPackage ../development/tools/misc/checkbashisms { }; + clamav = callPackage ../tools/security/clamav { }; clex = callPackage ../tools/misc/clex { };