[Nix-dev] Writing a nix expression to catfish

José Romildo Malaquias j.romildo at gmail.com
Wed Aug 13 03:32:33 CEST 2014


Hello.

I am trying to write a derivation for catfish, a Python application. I
have tried the attached derivation.

When trying to build the package with the command 'nix-build -K -A
catfish', I am getting the error that can be seen in the attached log
file.

Any clues on how to fix them?

Romildo
-------------- next part --------------
{ stdenv
, fetchurl
, python
, pythonPackages
, gtk3
, atk
, xdg_utils
}:

stdenv.mkDerivation rec {
  majorVersion = "1.0";
  minorVersion = "3";
  version = "${majorVersion}.${minorVersion}";
  pname = "catfish";
  name = "${pname}-${version}";

  src = fetchurl {
    url = "https://launchpad.net/catfish-search/${majorVersion}/${version}/+download/${name}.tar.bz2";
    sha256 = "14hxcf3vrnv8ljnyz39k9hhzc3larx1aqdmvvgp2v5pdjcpngfsx";
  };

  buildInputs = [
    python
    pythonPackages.pygobject3 pythonPackages.pyxdg pythonPackages.pexpect
    gtk3 atk xdg_utils
  ];

  meta = {
    description = "A versatile file searching tool.";
    longDescription = ''
      Catfish is a GTK+ search utility written in python. It's search is
      powered by find and locate, with search suggestions provided by
      zeitgeist.
    '';
    homepage = "http://www.twotoasts.de/index.php/catfish/";
    license = stdenv.lib.licenses.gpl2;
    maintainers = [ stdenv.lib.maintainers.romildo ];
  };
}
-------------- next part --------------
these derivations will be built:
  /nix/store/sxh1rk5v3n0rhh0gfw40xv0w07577q3v-catfish-1.0.3.drv
building path(s) `/nix/store/b5aclqgzacz799dm2cjaqslqdi8a6fgv-catfish-1.0.3'
building /nix/store/b5aclqgzacz799dm2cjaqslqdi8a6fgv-catfish-1.0.3
unpacking sources
unpacking source archive /nix/store/m9g0jywn8hrmds8bdik908vgbs0q10hi-catfish-1.0.3.tar.bz2
source root is catfish-1.0.3
patching sources
configuring
configure flags: --prefix=/nix/store/b5aclqgzacz799dm2cjaqslqdi8a6fgv-catfish-1.0.3  

** (process:26787): WARNING **: Failed to load shared library 'libgtk-3.so.0' referenced by the typelib: libgtk-3.so.0: cannot open shared object file: No such file or directory

** (process:26787): WARNING **: Failed to load shared library 'libgdk-3.so.0' referenced by the typelib: libgdk-3.so.0: cannot open shared object file: No such file or directory

** (process:26787): WARNING **: Failed to load shared library 'libatk-1.0.so.0' referenced by the typelib: libatk-1.0.so.0: cannot open shared object file: No such file or directory
Checking module dependencies...
Traceback (most recent call last):
  File "build.py", line 43, in <module>
    from gi.repository import GObject, Gtk, Gdk, GdkPixbuf, Pango
  File "/nix/store/ahikgl99mxi33p5pz1xlj8hg6qc04bvf-pygobject-3.12.1/lib/python2.7/site-packages/gi/importer.py", line 68, in load_module
    dynamic_module._load()
  File "/nix/store/ahikgl99mxi33p5pz1xlj8hg6qc04bvf-pygobject-3.12.1/lib/python2.7/site-packages/gi/module.py", line 296, in _load
    self._overrides_module = importlib.import_module('gi.overrides.' + self._namespace)
  File "/nix/store/vacbfv64i3ch2p792fm2bgca7ksw1y4x-python-2.7.8/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/nix/store/ahikgl99mxi33p5pz1xlj8hg6qc04bvf-pygobject-3.12.1/lib/python2.7/site-packages/gi/overrides/Gtk.py", line 75, in <module>
    class Widget(Gtk.Widget):
  File "/nix/store/ahikgl99mxi33p5pz1xlj8hg6qc04bvf-pygobject-3.12.1/lib/python2.7/site-packages/gi/module.py", line 183, in __getattr__
    interfaces = tuple(interface for interface in get_interfaces_for_object(info)
  File "/nix/store/ahikgl99mxi33p5pz1xlj8hg6qc04bvf-pygobject-3.12.1/lib/python2.7/site-packages/gi/module.py", line 109, in get_interfaces_for_object
    interfaces.append(getattr(module, name))
  File "/nix/store/ahikgl99mxi33p5pz1xlj8hg6qc04bvf-pygobject-3.12.1/lib/python2.7/site-packages/gi/module.py", line 320, in __getattr__
    return getattr(self._introspection_module, name)
  File "/nix/store/ahikgl99mxi33p5pz1xlj8hg6qc04bvf-pygobject-3.12.1/lib/python2.7/site-packages/gi/module.py", line 222, in __getattr__
    wrapper = metaclass(name, bases, dict_)
  File "/nix/store/ahikgl99mxi33p5pz1xlj8hg6qc04bvf-pygobject-3.12.1/lib/python2.7/site-packages/gi/types.py", line 221, in __init__
    register_interface_info(cls.__info__.get_g_type())
TypeError: must be an interface
Creating Makefile...
Creating package data...
Installation prefix is /nix/store/b5aclqgzacz799dm2cjaqslqdi8a6fgv-catfish-1.0.3
building
make flags: SHELL=/nix/store/q5wfq0i6w4p6a7155p4hia6p3n8rk7aq-bash-4.2-p47/bin/bash    
building locale/en_AU/LC_MESSAGES/catfish.mo
mkdir -p locale/en_AU/LC_MESSAGES/
msgfmt po/en_AU.po -o locale/en_AU/LC_MESSAGES/catfish.mo
/nix/store/q5wfq0i6w4p6a7155p4hia6p3n8rk7aq-bash-4.2-p47/bin/bash: msgfmt: command not found
make: *** [locale/en_AU/LC_MESSAGES/catfish.mo] Error 127
note: keeping build directory `/tmp/nix-build-catfish-1.0.3.drv-11'
builder for `/nix/store/sxh1rk5v3n0rhh0gfw40xv0w07577q3v-catfish-1.0.3.drv' failed with exit code 2
error: build of `/nix/store/sxh1rk5v3n0rhh0gfw40xv0w07577q3v-catfish-1.0.3.drv' failed


More information about the nix-dev mailing list