summary refs log tree commit diff
path: root/pkgs/tools/misc/cloc
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2016-05-22 16:26:53 +0200
committerRobert Helgesson <robert@rycee.net>2016-05-22 17:07:34 +0200
commite03effb6d9b47fe9f73a4e83316b6f1be053339d (patch)
treedc550b881a64f16cda208cd203fe137e88c37934 /pkgs/tools/misc/cloc
parentf16da199e424a02717cca2fb98df79252749cbea (diff)
downloadnixpkgs-e03effb6d9b47fe9f73a4e83316b6f1be053339d.tar
nixpkgs-e03effb6d9b47fe9f73a4e83316b6f1be053339d.tar.gz
nixpkgs-e03effb6d9b47fe9f73a4e83316b6f1be053339d.tar.bz2
nixpkgs-e03effb6d9b47fe9f73a4e83316b6f1be053339d.tar.lz
nixpkgs-e03effb6d9b47fe9f73a4e83316b6f1be053339d.tar.xz
nixpkgs-e03effb6d9b47fe9f73a4e83316b6f1be053339d.tar.zst
nixpkgs-e03effb6d9b47fe9f73a4e83316b6f1be053339d.zip
cloc: 1.64 -> 1.66
New upstream is at GitHub.
Diffstat (limited to 'pkgs/tools/misc/cloc')
-rw-r--r--pkgs/tools/misc/cloc/default.nix28
1 files changed, 13 insertions, 15 deletions
diff --git a/pkgs/tools/misc/cloc/default.nix b/pkgs/tools/misc/cloc/default.nix
index 0b5796d4ac3..2dafaca1961 100644
--- a/pkgs/tools/misc/cloc/default.nix
+++ b/pkgs/tools/misc/cloc/default.nix
@@ -1,31 +1,29 @@
-{ stdenv, fetchurl, fetchpatch, perl, AlgorithmDiff, RegexpCommon }:
+{ stdenv, fetchFromGitHub, makeWrapper, perl, AlgorithmDiff, RegexpCommon }:
 
 stdenv.mkDerivation rec {
-
   name = "cloc-${version}";
+  version = "1.66";
 
-  version = "1.64";
-
-  src = fetchurl {
-    url = "mirror://sourceforge/cloc/cloc-${version}.tar.gz";
-    sha256 = "1w3mz69h2i7pscvi9q7yp7wimds8g38c5ph78cj5pvjl5wa035rh";
+  src = fetchFromGitHub {
+    owner = "AlDanial";
+    repo = "cloc";
+    rev = "v${version}";
+    sha256 = "1xj6d8x8zwijym5wznm0k1478z7zx3bfjsx20r3aqb1vhkvcjsm9";
   };
 
-  patches = [ (fetchpatch {
-    name = "perl-5.22.patch";
-    url = "https://bugs.archlinux.org/task/45494?getfile=13174";
-    sha256 = "1xxwqjy2q2fdza7kfp9ld0yzljkdsrgm8a9pwnmx5q4adigcjjsz";
-  }) ];
+  sourceRoot = "cloc-v${version}-src/Unix";
 
-  buildInputs = [ perl AlgorithmDiff RegexpCommon ];
+  buildInputs = [ makeWrapper perl AlgorithmDiff RegexpCommon ];
 
   makeFlags = [ "prefix=" "DESTDIR=$(out)" "INSTALL=install" ];
 
+  postFixup = "wrapProgram $out/bin/cloc --prefix PERL5LIB : $PERL5LIB";
+
   meta = {
     description = "A program that counts lines of source code";
-    homepage = http://cloc.sourceforge.net;
+    homepage = https://github.com/AlDanial/cloc;
     license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.all;
     maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
   };
-
 }