From e6150d8be9811b72449aad0d106b9417b6036813 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Fri, 3 Mar 2017 12:28:01 +0800 Subject: pmccabe: 2.4 -> 2.6 --- pkgs/development/tools/misc/pmccabe/default.nix | 33 +++++++++++++++---------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'pkgs/development/tools/misc/pmccabe') diff --git a/pkgs/development/tools/misc/pmccabe/default.nix b/pkgs/development/tools/misc/pmccabe/default.nix index 18f3fe375cbc..77066cfc8e15 100644 --- a/pkgs/development/tools/misc/pmccabe/default.nix +++ b/pkgs/development/tools/misc/pmccabe/default.nix @@ -1,24 +1,30 @@ -{ fetchurl, stdenv }: +{ stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "pmccabe-2.4-CVS20070814"; + name = "pmccabe-${version}"; + version = "2.6"; src = fetchurl { - url = "http://cvs.parisc-linux.org/download/${name}.tar.gz"; - sha256 = "0nqvfdf2cxx516nw0rwr3lhzhiyrnpc2jf45ldfwsdc9rm2nj3r9"; + url = "http://http.debian.net/debian/pool/main/p/pmccabe/pmccabe_${version}.tar.gz"; + sha256 = "0a3h1b9fb87c82d5fbql5lc4gp338pa5s9i66dhw7zk8jdygx474"; }; configurePhase = '' - sed -i "Makefile" \ - -"es|^[[:blank:]]*DESTDIR[[:blank:]]*=.*$|DESTDIR = $out|g ; \ - s|^[[:blank:]]*INSTALL[[:blank:]]*=.*$|INSTALL = install|g ; \ - s|/usr/|/|g" - ''; + sed -i -r Makefile \ + -e 's,/usr/,/,g' \ + -e "s,^DESTDIR =.*$,DESTDIR = $out," \ + -e "s,^INSTALL = install.*$,INSTALL = install," \ + -e "s,^all:.*$,all: \$(PROGS)," + ''; + + checkPhase = "make test"; + + doCheck = true; - meta = { + meta = with stdenv.lib; { description = "McCabe-style function complexity and line counting for C and C++"; - homepage = http://www.parisc-linux.org/~bame/pmccabe/; - license = stdenv.lib.licenses.gpl2Plus; + homepage = https://people.debian.org/~bame/pmccabe/; + license = licenses.gpl2Plus; longDescription = '' pmccabe calculates McCabe-style cyclomatic complexity for C and @@ -32,6 +38,7 @@ stdenv.mkDerivation rec { trees or files; and vifn, to invoke vi given a function name rather than a file name. ''; - platforms = stdenv.lib.platforms.linux; + platforms = platforms.linux; + maintainers = with maintainers; [ peterhoeg ]; }; } -- cgit 1.4.1