summary refs log tree commit diff
path: root/pkgs/os-specific/linux/libsmbios/default.nix
blob: 98ec778e2c26004ac3d23befa5556cf798ceaa25 (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
31
32
33
34
35
36
{ stdenv, fetchurl, pkgconfig, libxml2, perl, autoreconfHook, doxygen }:

let
  version = "2.3.2";
in
stdenv.mkDerivation {
  name = "libsmbios-${version}";

  src = fetchurl {
    url = "https://github.com/dell/libsmbios/archive/v${version}.tar.gz";
    sha256 = "0kvi36jrvhspyyq0pjfdyvzvimdn27fvbdpf429qm3xdmfi78y2j";
  };

  nativeBuildInputs = [ autoreconfHook pkgconfig ];
  buildInputs = [ libxml2 perl doxygen ];

  # It tries to install some Python stuff even when Python is disabled.
  installFlags = "pkgpythondir=$(TMPDIR)/python";

  postInstall =
    ''
      mkdir -p $out/include
      cp -va "src/include/"* "$out/include/"
      cp -va "out/public-include/"* "$out/include/"
    '';

  # Hack to avoid TMPDIR in RPATHs.
  preFixup = ''rm -rf "$(pwd)" '';

  meta = {
    homepage = http://linux.dell.com/libsmbios/main;
    description = "A library to obtain BIOS information";
    license = stdenv.lib.licenses.gpl2Plus; # alternatively, under the Open Software License version 2.1
    platforms = [ "i686-linux" "x86_64-linux" ];
  };
}