summary refs log tree commit diff
path: root/pkgs/tools/admin/gtk-vnc/default.nix
blob: 3b535dabbae1dfc89c4cf5dbd20d801fd228101e (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
x@{builderDefsPackage
  , python, gtk, pygtk, gnutls, cairo, libtool, glib, pkgconfig, libtasn1
  , libffi, cyrus_sasl, intltool, perl, perlPackages, firefox36Pkgs
  , kbproto, libX11, libXext, xextproto, pygobject
  , ...}:
builderDefsPackage
(a :  
let 
  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
    ["perlPackages" "firefox36Pkgs" "gtkLibs"];

  buildInputs = (map (n: builtins.getAttr n x)
    (builtins.attrNames (builtins.removeAttrs x helperArgNames)))
    ++ [perlPackages.TextCSV firefox36Pkgs.xulrunner ];
  sourceInfo = rec {
    baseName="gtk-vnc";
    majorVersion="0.4";
    minorVersion="2";
    version="${majorVersion}.${minorVersion}";
    name="${baseName}-${version}";
    url="mirror://gnome/sources/${baseName}/${majorVersion}/${name}.tar.gz";
    hash="1fkhzwpw50rnwp51lsbny16p2ckzx5rkcaiaqvkd90vwnm2cccls";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    sha256 = sourceInfo.hash;
  };

  inherit (sourceInfo) name version;
  inherit buildInputs;

  configureFlags = [
    "--with-python"
    "--with-examples"
  ];

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

  fixMakefiles = a.fullDepEntry ''
    find . -name 'Makefile*' -exec sed -i '{}' -e 's@=codegendir pygtk-2.0@=codegendir pygobject-2.0@' ';'
  '' ["minInit" "doUnpack"];
      
  meta = {
    description = "A GTK VNC widget";
    maintainers = with a.lib.maintainers;
    [
      raskin
    ];
    platforms = with a.lib.platforms;
      linux;
    license = a.lib.licenses.lgpl21;
  };
  passthru = {
    updateInfo = {
      downloadPage = "http://ftp.gnome.org/pub/GNOME/sources/gtk-vnc";
    };
  };
}) x