3
0
Fork 0
forked from mirrors/nixpkgs

ninka: update to 1.1 and refactor

This commit is contained in:
Domen Kožar 2013-10-30 11:40:53 +01:00
parent d63f5de7db
commit 09fa7304ae

View file

@ -1,41 +1,34 @@
{stdenv, fetchgit, perl}:
{ stdenv, fetchurl, perl }:
assert stdenv ? glibc;
let
rev = "7a9a5c48ede207eec881";
in
stdenv.mkDerivation {
name = "ninka-"+rev;
src = fetchgit {
url = http://github.com/dmgerman/ninka.git;
inherit rev;
sha256 = "3e877fadf074b9c5abfe36ff10b7e332423d1d4c5b17accc5586c7cffdb2c7dd";
stdenv.mkDerivation rec {
name = "ninka-${version}";
version = "1.1";
src = fetchurl {
url = "https://github.com/dmgerman/ninka/archive/${version}.tar.gz";
sha256 = "1cvbsmanw3i9igiafpx0ghg658c37riw56mjk5vsgpmnn3flvhib";
};
buildInputs = [ perl ];
buildPhase = ''
cd comments
tar xfvz comments.tar.gz
cd comments
sed -i -e "s|/usr/local/bin|$out/bin|g" -e "s|/usr/local/man|$out/share/man|g" Makefile
make
'';
installPhase = ''
cd ../..
mkdir -p $out/bin
cp ninka.pl $out/bin
cp -av {extComments,splitter,filter,senttok,matcher} $out/bin
cd comments/comments
mkdir -p $out/{bin,share/man/man1}
make install
cp -a ../{ninka.pl,extComments,splitter,filter,senttok,matcher} $out/bin
'';
meta = {
license = "AGPLv3+";
description = "A sentence based license detector";
homepage = "http://ninka.turingmachine.org/";
license = "AGPLv3+";
};
}