about summary refs log tree commit diff
path: root/pkgs/tools/system/vbetool/default.nix
blob: 402f93ec8fbab33e13604d2b797e6fe3d496bb04 (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
a @ {pciutils, libx86, zlib, ...} :
let
  s = import ./src-for-default.nix;
  buildInputs = with a; [
    libx86 pciutils zlib
  ];
in
rec {
  src = a.fetchUrlFromSrcInfo s;

  inherit (s) name;
  inherit buildInputs;
  configureFlags = [];

  /* doConfigure should be removed if not needed */
  phaseNames = ["fixPCIref" "doConfigure" "doMakeInstall"];

  fixPCIref = a.fullDepEntry (''
    sed -e 's@$(libdir)/libpci.a@${a.pciutils}/lib/libpci.so@' -i Makefile.in
    export NIX_LDFLAGS="$NIX_LDFLAGS -lpci"
  '') ["doUnpack" "minInit"];

  meta = {
    description = "Video BIOS execution tool";
    maintainers = [
      a.lib.maintainers.raskin
    ];
    platforms = with a.lib.platforms;
      linux;
  };
}