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.