1
- { stdenv , fetchurl , gzip , popt } :
1
+ { stdenv , fetchFromGitHub , mailutils , gzip , popt , autoreconfHook } :
2
2
3
3
stdenv . mkDerivation rec {
4
- name = "logrotate-3.9.1" ;
4
+ name = "logrotate-${ version } " ;
5
+ version = "3.12.3" ;
5
6
6
- src = fetchurl {
7
- url = "https://fedorahosted.org/releases/l/o/logrotate/${ name } .tar.gz" ;
8
- sha256 = "0i95qnacv5wf7kfkcpi38ys3i14fr01ifhm8b4ari04c53inj9q2" ;
7
+ src = fetchFromGitHub {
8
+ owner = "logrotate" ;
9
+ repo = "logrotate" ;
10
+ rev = version ;
11
+ sha256 = "04ygb709fj4ai8m2f1c6imzcmkdvr3ib5zf5qw2lif4fsb30jvyi" ;
9
12
} ;
10
13
11
14
# Logrotate wants to access the 'mail' program; to be done.
12
15
patchPhase = ''
13
16
sed -i -e 's,[a-z/]\+gzip,${ gzip } /bin/gzip,' \
14
- -e 's,[a-z/]\+gunzip,${ gzip } /bin/gunzip,' config.h
17
+ -e 's,[a-z/]\+gunzip,${ gzip } /bin/gunzip,' \
18
+ -e 's,[a-z/]\+mail,${ mailutils } /bin/mail,' configure.ac
15
19
'' ;
16
20
17
- preBuild = ''
18
- makeFlags="BASEDIR=$out"
21
+ autoreconfPhase = ''
22
+ ./autogen.sh
19
23
'' ;
20
24
25
+ nativeBuildInputs = [ autoreconfHook ] ;
21
26
buildInputs = [ popt ] ;
22
27
23
28
meta = {
@@ -27,5 +32,4 @@ stdenv.mkDerivation rec {
27
32
maintainers = [ stdenv . lib . maintainers . viric ] ;
28
33
platforms = stdenv . lib . platforms . all ;
29
34
} ;
30
-
31
35
}
0 commit comments