Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempted to add KMix for KDE 5 #22307

Closed
rongcuid opened this issue Jan 31, 2017 · 3 comments
Closed

Attempted to add KMix for KDE 5 #22307

rongcuid opened this issue Jan 31, 2017 · 3 comments

Comments

@rongcuid
Copy link
Contributor

rongcuid commented Jan 31, 2017

Issue description

I am currently attempting to add kmix into nixpkgs, whose format I am still not familiar with. However, I get errors about not finding kdelibs4, despite adding in kdelibs4support, and such libraries present in /nix/store. I can't find a command to see my current installed "packages", so I am not completely sure.

A minor point: I don't know whether my box has sound yet, since the sound settings in KDE doesn't play anything when Test is pressed. OK, so sound is fine. This just leaves KMix to be installed.

Steps to reproduce

kmix.nix, modified from konsole.nix(or dolphin, I don't remember). I put it under nixpkgs/pkgs/desktops/kde-5/applications of a cloned nixpkgs repo.

{
  kdeApp, lib, kdeWrapper,
  ecm, kdoctools,
  kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kguiaddons,
  ki18n, kiconthemes, kinit, kdelibs4support, kio, knotifications,
  knotifyconfig, kparts, kpty, kservice, ktextwidgets, kwidgetsaddons,
  kwindowsystem, kxmlgui, qtscript
}:

let
  unwrapped =
    kdeApp {
      name = "kmix";
      meta = {
        license = with lib.licenses; [ gpl2 lgpl21 fdl12 ];
        #maintainers = [ lib.maintainers.ttuegel ];
      };
      nativeBuildInputs = [ ecm kdoctools ];
      propagatedBuildInputs = [
        kdelibs4support ki18n kwindowsystem qtscript kbookmarks kcompletion
        kconfig kconfigwidgets kcoreaddons kguiaddons kiconthemes kinit kio
        knotifications knotifyconfig kparts kpty kservice ktextwidgets
        kwidgetsaddons kxmlgui
      ];
    };
in
kdeWrapper {
  inherit unwrapped;
  targets = [ "bin/kmix" ];
}

I tried to read through the files, but there are a lot to learn, so I haven't get it yet. Anyhow, this is what happens when I attempt to install kmix:

unpacking sources
unpacking source archive /nix/store/b689q3lx6n39rzd4b54rvahdvai06h1r-kmix-16.12.1.tar.xz
source root is kmix-16.12.1
setting SOURCE_DATE_EPOCH to timestamp 1478141574 of file kmix-16.12.1/tests/profiletest.xml
patching sources
configuring
qmake: File exists
fixing cmake files...
cmake flags: -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/rgwg7zhj4d29hhxpyixdp3z5f91jzwcq-kmix-16.12.1-dev/include -DCMAKE_INSTALL_LIBDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/lib -DCMAKE_INSTALL_PREFIX=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1 -DBUILD_TESTING=OFF -DBUILD_TESTING=OFF -DKDE_INSTALL_EXECROOTDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1 -DKDE_INSTALL_BINDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/bin -DKDE_INSTALL_SBINDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/sbin -DKDE_INSTALL_LIBDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/lib -DKDE_INSTALL_LIBEXECDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/lib/libexec -DKDE_INSTALL_CMAKEPACKAGEDIR=/nix/store/rgwg7zhj4d29hhxpyixdp3z5f91jzwcq-kmix-16.12.1-dev/lib/cmake -DKDE_INSTALL_QTPLUGINDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/lib/qt5/plugins -DKDE_INSTALL_PLUGINDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/lib/qt5/plugins -DKDE_INSTALL_QTQUICKIMPORTSDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/lib/qt5/imports -DKDE_INSTALL_QMLDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/lib/qt5/qml -DKDE_INSTALL_INCLUDEDIR=/nix/store/rgwg7zhj4d29hhxpyixdp3z5f91jzwcq-kmix-16.12.1-dev/include -DKDE_INSTALL_LOCALSTATEDIR=/var -DKDE_INSTALL_DATAROOTDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share -DKDE_INSTALL_DATADIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share -DKDE_INSTALL_DOCBUNDLEDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/doc/HTML -DKDE_INSTALL_KCFGDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/config.kcfg -DKDE_INSTALL_KCONFUPDATEDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/kconf_update -DKDE_INSTALL_KSERVICES5DIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/kservices5 -DKDE_INSTALL_KSERVICETYPES5DIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/kservicetypes5 -DKDE_INSTALL_KXMLGUI5DIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/kxmlgui5 -DKDE_INSTALL_KNOTIFY5RCDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/knotifications5 -DKDE_INSTALL_ICONDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/icons -DKDE_INSTALL_LOCALEDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/locale -DKDE_INSTALL_SOUNDDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/sounds -DKDE_INSTALL_TEMPLATEDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/templates -DKDE_INSTALL_WALLPAPERDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/wallpapers -DKDE_INSTALL_APPDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/applications -DKDE_INSTALL_DESKTOPDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/desktop-directories -DKDE_INSTALL_MIMEDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/mime/packages -DKDE_INSTALL_METAINFODIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/appdata -DKDE_INSTALL_MANDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/man -DKDE_INSTALL_INFODIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/info -DKDE_INSTALL_DBUSDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/dbus-1 -DKDE_INSTALL_DBUSINTERFACEDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/dbus-1/interfaces -DKDE_INSTALL_DBUSSERVICEDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/dbus-1/services -DKDE_INSTALL_DBUSSYSTEMSERVICEDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/share/dbus-1/system-services -DKDE_INSTALL_SYSCONFDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/etc -DKDE_INSTALL_CONFDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/etc/xdg -DKDE_INSTALL_AUTOSTARTDIR=/nix/store/prl7w0zr727r5an89q6g1vpcvly7whh3-kmix-16.12.1/etc/xdg/autostart 
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /nix/store/mafk2xkm2aw0pnbmxx70zkh1m2ch7fm6-gcc-wrapper-5.4.0/bin/gcc
-- Check for working C compiler: /nix/store/mafk2xkm2aw0pnbmxx70zkh1m2ch7fm6-gcc-wrapper-5.4.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /nix/store/mafk2xkm2aw0pnbmxx70zkh1m2ch7fm6-gcc-wrapper-5.4.0/bin/g++
-- Check for working CXX compiler: /nix/store/mafk2xkm2aw0pnbmxx70zkh1m2ch7fm6-gcc-wrapper-5.4.0/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /nix/store/g5wfxlnl5fvg1awx15ksi01p90xpm3c9-cmake-3.7.1/share/cmake-3.7/Modules/FindKDE4.cmake:60 (message):
  ERROR: Could not find KDE4 kde4-config
Call Stack (most recent call first):
  CMakeLists.txt:52 (find_package)


-- Configuring incomplete, errors occurred!
See also "/tmp/nix-build-kmix-16.12.1.drv-0/kmix-16.12.1/build/CMakeFiles/CMakeOutput.log".
builder for ‘/nix/store/h1p7y49d2xbjaxqi64kbvhki2whva5lc-kmix-16.12.1.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/56xlvbh796malfnlhf1gffpnvznpm0ph-kmix-16.12.1.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/xcaqwr2632dwn3midlhbmhlksh4hcq1v-system-path.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/jn0rb00rpmkbafdw8ahbp0ksd7y6055w-nixos-system-rongcuidXPS13-17.03.git.dbd4a35.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/jn0rb00rpmkbafdw8ahbp0ksd7y6055w-nixos-system-rongcuidXPS13-17.03.git.dbd4a35.drv’ failed

I don't know whether kdelibs4 is required, because there is such a suspicious looking kdelibs4support. Nor do I know how to add such build dependencies(yet)... The entire KDE thing is totally uncommented, and I basically need to reverse engineer through a tree of source file. Hopefully the current maintainer can add some comments.

Technical details

  • System: 17.03pre99759.f66d782 (Gorilla)
  • Nix version: nix-env (Nix) 1.11.6
  • Nixpkgs version: "17.03pre99759.f66d782"
@peterhoeg
Copy link
Member

peterhoeg commented Jan 31, 2017

kmix will by default try to build a kde4 version. If you have a look at CMakeLists.txt in the source distribution, you will see that you need to pass -DKMIX_KF5_BUILD=1 to cmake to have it build the KF5 version.

So you need to add this in after propagatedBuildInputs:

cmakeFlags = [
  "-DKMIX_KF5_BUILD=1"
];

You have also carried over all the dependencies of whatever you used as the skeleton, so before a PR would be ready to go you need to go through them and weed out the ones that are not needed.

With the cmakeflags part added in, cmake will tell you about the required and optional dependencies when it runs, so you can start with that.

Please also add yourself in as maintainer (assuming you are willing to take that on) and it also looks like the license is wrong.

Just shout if it you hit problems!

@rongcuid
Copy link
Contributor Author

Before I test install the pkg into my system... I see that CMake says it does not find optional deps like ALSA or Pulseaudio. Now I am testing in a nix-shell, so I didn't bring in the dependencies. However, do I need to add both to support all possible systems? Or will nix be intelligent enough to detect what's on my system and link those if present?

The compilation looks fine for now.

@rongcuid
Copy link
Contributor Author

rongcuid commented Jan 31, 2017

#22324 is the pull request

@rongcuid rongcuid mentioned this issue Jan 31, 2017
7 tasks
@LnL7 LnL7 closed this as completed Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants