Build-phase can't find my own custom packaged dependency, not sure where to go from here

So i’m trying to package a program called qcma. I managed to package it in the past with nix, but i can’t seem to get it to work as a Guix derivation and i’m running out of ideas. The program depends on a custom library that i managed to package succesfully, but during the build phase of qcma itself it complains about not being able to find the libvitamtp dependency, eventhough i’ve listed it as an input and native-input. Here are the derivations:

(define-module (config packages qcma)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system qt)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages libusb)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages qt)
  #:use-module (gnu packages video)
  #:use-module (gnu packages xml))

(define-public libvitamtp
  (package
   (name "libvitamtp")
   (version "2.5.10")
   (source (origin
            (method git-fetch)
            (uri (git-reference
                  (url "https://github.com/codestation/vitamtp")
                  (commit (string-append "v" version))))
            (file-name (git-file-name name version))
            (sha256
             (base32 "0np60v6c8a3v4fm9fba51a6g1bh89r9v5drr32iwvq2h64gykk8q"))))
   (build-system gnu-build-system)
   (native-inputs (list pkg-config
                        libxml2
                        libusb
                        libtool
                        automake
                        autoconf
                        gettext-minimal))
   (home-page "https://github.com/codestation/vitamtp")
   (synopsis "Library to interact with Vita's USB MTP protocol.")
   (description "libvitamtp is a library based off of libMTP that does low level USB communications with the Vita.
It can read and recieve MTP commands that the Vita sends, which are a proprietary set of commands that is based
on the MTP open standard.")
   (license license:gpl3)))

;; Can't get qcma package to work right now, it gives an error about not being able to find libvitamtp in the build phase,
;; eventhough it is listed as a dependency. I'll give this another try later.
(define-public qcma
  (package
   (name "qcma")
   (version "0.5.1")
   (source (origin
            (method git-fetch)
            (uri (git-reference
                  (url "https://github.com/codestation/qcma")
                  (commit (string-append "v" version))))
            (file-name (git-file-name name version))
            (sha256
             (base32 "14jb3p9ill5hqgzxx15l8dv34gpc3dsmvcc1yxrv8jdi7s8zg0nj"))))
   (build-system gnu-build-system)
   (inputs (list libvitamtp
                 libnotify
                 ffmpeg))
   (native-inputs (list pkg-config
                        libvitamtp
                        qttools
                        qtbase))
   (arguments
    (list #:phases
          #~(modify-phases %standard-phases
                           (replace 'configure
                                    (lambda _ (invoke "lrelease" "common/resources/translations/qcma_ja.ts")
                                            (substitute* "common/common.pro"
                                                         (("PKGCONFIG += libvitamtp")
                                                          (string-append "PKGCONFIG += " #$libvitamtp)))
                                               (invoke "qmake" "qcma.pro" (string-append "PREFIX=" #$output)))))))
   (home-page "https://github.com/codestation/qcma")
   (synopsis "Cross-platform content manager assistant for the PS Vita.")
   (description "QCMA is a cross-platform application to provide an open source implementation of the original
Content Manager Assistant that comes with the PS Vita. QCMA is meant to be compatible with Linux, Windows and MacOS.")
   (license license:gpl3)))                 

You’ll notice i tried messing around with the PKGCONFIG variable inside of common/common.pro, cause that’s the file where the build process seems to get stuck on, and PKGCONFIG is the only place in the file that i can tell where libvitamtp is mentioned at all. This is the error that the build process spits out:

Project ERROR: libvitamtp development package not found

I was wondering if there’s someone here who might have some experience with guix packaging that knows what’s going on here, cause so far i haven’t been able to figure out why it can’t find the dependency.

It may need to be a native input. Do you know the difference?

It shouldn’t be both

Yeah i know the difference. The reason i put it in both fields is because from my understanding the library is also a runtime dependency, but it’s been a while since i packaged it in nix and i basically just tried translating what i did there over to guix. For what it’s worth i did try removing it from the inputs field but it doesn’t make a difference.

If it’s a runtime dependency, then it needs to be propagated. Read through the Guix cookbook.

It also helps to think of a similar package, then run guix edit $packgename which pops open your $EDITOR to that package definition. There are tons of examples

Isn’t the difference between inputs and propagated-inputs that the packages also get installed into the profile? I don’t think that’s necessary for a library.

If you run ldd on the bin output, it will make it clear which library it expects to find.

It’s been awhile since I’ve built packages.

Propagated will make it available at the top-level profile where the package is installed