1{ stdenv, fetchurl, perl, coreutils, getopt, makeWrapper }:
2
3stdenv.mkDerivation rec {
4 version = "1.4";
5 name = "lsb-release-${version}";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/lsb/${name}.tar.gz";
9 sha256 = "0wkiy7ymfi3fh2an2g30raw6yxh6rzf6nz2v90fplbnnz2414clr";
10 };
11
12 preConfigure = ''
13 substituteInPlace help2man \
14 --replace /usr/bin/perl ${perl}/bin/perl
15 '';
16
17 installFlags = [ "prefix=$(out)" ];
18
19 nativeBuildInputs = [ makeWrapper perl ];
20
21 buildInputs = [ coreutils getopt ];
22
23 # Ensure utilities used are available
24 preFixup = ''
25 wrapProgram $out/bin/lsb_release --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils getopt ]}
26 '';
27
28 meta = {
29 description = "Prints certain LSB (Linux Standard Base) and Distribution information";
30 homepage = http://www.linuxfoundation.org/collaborate/workgroups/lsb;
31 license = [ stdenv.lib.licenses.gpl2Plus stdenv.lib.licenses.gpl3Plus ];
32 platforms = stdenv.lib.platforms.linux;
33 };
34}