about summary refs log tree commit diff
path: root/pkgs/tools/system/fakeroot/default.nix
blob: 7995a656c1e3fec0e4b51f9d7ddfacab34636bda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ stdenv, fetchurl, utillinux, libcap }:

stdenv.mkDerivation rec {
  version = "1.20.2";
  name = "fakeroot-${version}";

  src = fetchurl {
    url = "http://http.debian.net/debian/pool/main/f/fakeroot/fakeroot_${version}.orig.tar.bz2";
    sha256 = "0313xb2j6a4wihrw9gfd4rnyqw7zzv6wf3rfh2gglgnv356ic2kw";
  };

  buildInputs = [ utillinux /* provides getopt */ libcap ];

  postUnpack = ''
    for prog in getopt; do
      sed -i "s@getopt@$(type -p getopt)@g" ${name}/scripts/fakeroot.in
    done
  '';

  meta = {
    homepage = http://fakeroot.alioth.debian.org/;
    description = "Give a fake root environment through LD_PRELOAD";
    license = stdenv.lib.licenses.gpl2Plus;
    maintainers = with stdenv.lib.maintainers; [viric];
    platforms = with stdenv.lib.platforms; linux;
  };

}