Howdy! I’m trying to build my first package as a way to understand how this all works. I’m getting an error message I’m not sure how to fix.
Goal: Package and contribute GitHub - chmouel/gnome-next-meeting-applet: An appindicator applet to show how long you have until your next meeting into the main nix channel.
Strategy: I’m going to model it after an other gnome applet (nixpkgs/default.nix at 386234e2a61e1e8acf94dfa3a3d3ca19a6776efb · NixOS/nixpkgs · GitHub) but this project looks like to be using poetry so I’ll try using poetry2nix to manage the dependencies.
After this: Get it working with fetchFromGithub
Here’s what I have so far in default.nix
:
{ lib
, poetry2nix
, python
, fetchFromGitHub
, projectDir ? ./.
, pyproject ? projectDir + "/pyproject.toml"
, poetrylock ? projectDir + "/poetry.lock"
, glib
, gtk2
, gst_all_1
, gnome2
, gnome-icon-theme
, gst_plugins ? with gst_all_1; [ gst-plugins-base gst-plugins-good gst-plugins-ugly ]
, wrapGAppsHook
}:
poetry2nix.mkPoetryApplication {
projectDir = ./.;
nativeBuildInputs = [
gnome2.gnome-common
wrapGAppsHook
];
buildInputs = [
glib
gtk2
gst_all_1.gstreamer
gnome2.GConf
gnome-icon-theme
] ++ gst_plugins;
propagatedUserEnvPkgs = [ gnome2.GConf.out ];
}
… and building it with nix-build -E "with import <nixpkgs> {}; callPackage ./default.nix {}"
in the gnome-next-meeting-applet
repo folder fails with:
Created wheel for mypy: filename=mypy-0.930-py3-none-any.whl size=2410549 sha256=d117c66e1311042907eff67c3d7eba834c061c7f556c8a74f7617aded3d0003e
Stored in directory: /build/pip-ephem-wheel-cache-3l9193_f/wheels/46/be/96/47005aed4665f74636794a4e684d17943fd27f54e44fb0ba1f
adding 'jedi-0.18.1.dist-info/RECORD'
checking for a version of Python >= '2.1.0'... yes
removing build/bdist.linux-x86_64/wheel
Successfully built mypy
Removed build tracker: '/build/pip-req-tracker-d5mfyrhx'
checking for a version of Python >= '2.7'... yes
checking for the distutils Python package... yes
done
Created wheel for jedi: filename=jedi-0.18.1-py2.py3-none-any.whl size=1567207 sha256=2065a4d493583732ed2da7c3104f5a0a13b1b485c7ce84159e6ca5387126a211
Stored in directory: /build/pip-ephem-wheel-cache-xq7d_5e9/wheels/0a/2f/3c/58af78b4f17d5d568f44380dc01a00c75e18d065571094159c
Finished creating a wheel...
Finished executing pipBuildPhase
installing
Executing pipInstallPhase
/build/mypy-0.930/dist /build/mypy-0.930
Successfully built jedi
Removed build tracker: '/build/pip-req-tracker-05d2wvue'
Processing ./astroid-2.9.0-py3-none-any.whl
checking for Python include path... -I/nix/store/wl02plhc6zf84m6x9984l42wnnnbly5m-python3-3.9.6/include/python3.9
Requirement already satisfied: setuptools>=20.0 in /nix/store/h63hvrrn9rch158j8pgwymddrr226ypy-python3.9-setuptools-57.2.0/lib/python3.9/site-packages (from astroid==2.9.0) (57.2.0.post0)
Requirement already satisfied: typing-extensions>=3.10 in /nix/store/4r5pwrjw4s7idygf23ykmakrc7fdbzz4-python3.9-typing-extensions-4.0.1/lib/python3.9/site-packages (from astroid==2.9.0) (4.0.1)
Requirement already satisfied: wrapt<1.14,>=1.11 in /nix/store/5bir34da0yldylsblahlhhh2qmsp4br0-python3.9-wrapt-1.13.3/lib/python3.9/site-packages (from astroid==2.9.0) (1.13.3)
Requirement already satisfied: lazy-object-proxy>=1.4.0 in /nix/store/361ac5azs40sc8001f8kgw1v8p0p82dg-python3.9-lazy-object-proxy-1.7.1/lib/python3.9/site-packages (from astroid==2.9.0) (1.7.1)
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -I/build/pip-req-build-5ymh2e2v -I/build/pip-req-build-5ymh2e2v/gi -I/nix/store/abgmwq47jf084fb6j78caxwrx37vvf20-glib-2.70.1-dev/include/glib-2.0 -I/nix/store/v5f5ha5i3rjnfd675nlimmx7r5pvah1m-glib-2.70.1/lib/glib-2.0/include -I/nix/store/abgmwq47jf084fb6j78caxwrx37vvf20-glib-2.70.1-dev/include -I/nix/store/k8b8sqa1hkv56myxj82ak7jmbwd7x9hd-gobject-introspection-1.70.0-dev/include/gobject-introspection-1.0 -I/nix/store/pqvrbmm1lmb3b57vrlafhvc1svfa9aa3-libffi-3.4.2-dev/include -I/nix/store/wl02plhc6zf84m6x9984l42wnnnbly5m-python3-3.9.6/include/python3.9 -c gi/pygflags.c -o build/temp.linux-x86_64-3.9/gi/pygflags.o -Wall -Warray-bounds -Wcast-align -Wduplicated-branches -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Wjump-misses-init -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnull-dereference -Wold-style-definition -Wpacked -Wpointer-arith -Wrestrict -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch-default -Wundef -Wunused-but-set-variable -Wwrite-strings -Wno-incompatible-pointer-types-discards-qualifiers -Wno-missing-field-initializers -Wno-unused-parameter -Wno-discarded-qualifiers -Wno-sign-conversion -Wno-cast-function-type -Wno-int-conversion -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
Finished creating a wheel...
Finished executing pipBuildPhase
installing
Executing pipInstallPhase
/build/jedi-0.18.1/dist /build/jedi-0.18.1
checking for Python library path... -L/nix/store/wl02plhc6zf84m6x9984l42wnnnbly5m-python3-3.9.6/lib -lpython3.9
checking for Python site-packages path... /nix/store/wl02plhc6zf84m6x9984l42wnnnbly5m-python3-3.9.6/lib/python3.9/site-packages
Installing collected packages: astroid
checking python extra libraries... -lpthread -ldl -lcrypt -lncurses -lutil -lm -lm
checking python extra linking flags... -Xlinker -export-dynamic
checking consistency of all components of python development environment... no
configure: error: in `/build/dbus-python-1.2.18':
configure: error:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LIBS environment variable.
Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
See `config.log' for more details
Successfully installed astroid-2.9.0
builder for '/nix/store/yg2p9mx6ir2h36r3dl6bc6xmz5hb0isz-python3.9-dbus-python-1.2.18.drv' failed with exit code 1
cannot build derivation '/nix/store/wmjdqv30as5hqp0a3wh1fl453h848pwk-python3.9-gnome-next-meeting-applet-2.6.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/wmjdqv30as5hqp0a3wh1fl453h848pwk-python3.9-gnome-next-meeting-applet-2.6.2.drv' failed
Any suggestions?