summary refs log tree commit diff
path: root/pkgs/os-specific/linux/libsepol/default.nix
blob: 29b6d80445a5c31f65e0d5f680507d2b283fc53a (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
29
30
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "libsepol-${version}";
  version = "2.3";
  se_release = "20140506";
  se_url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases";

  src = fetchurl {
    url = "${se_url}/${se_release}/libsepol-${version}.tar.gz";
    sha256 = "13z6xakc2qqyhlvnc5h53jy7lqmh5b5cnpfn51lmvfdpqd18d3fc";
  };

  preBuild = '' makeFlags="$makeFlags PREFIX=$out DESTDIR=$out" '';

  # TODO: Figure out why the build incorrectly links libsepol.so
  postInstall = ''
    rm $out/lib/libsepol.so
    ln -s libsepol.so.1 $out/lib/libsepol.so
  '';

  passthru = { inherit se_release se_url; };

  meta = with stdenv.lib; {
    homepage = http://userspace.selinuxproject.org;
    platforms = platforms.linux;
    maintainers = [ maintainers.phreedom ];
    license = stdenv.lib.licenses.gpl2;
  };
}