hello everyone, hopefully i’m not asking a silly question but figured i’d give it a try here. so i’m still very much a noob but wanted to try and practice with derivations, but i’m now running into an error that i can’t seem to pinpoint the cause of. i’m trying to package qcma, which depends on a custom library that also isn’t in nixpkgs, so i made a derivation for the library, which builds succesfully:
{ lib, stdenv, fetchFromGitHub, pkg-config, automake, autoconf, libxml2, libusb1, libtool, gettext }:
stdenv.mkDerivation {
pname = “libvitamtp”;
version = “2.5.9”;
src = fetchFromGitHub {
owner = “codestation”;
repo = “vitamtp”;
rev = “v2.5.9”;
hash = “sha256-yKlfy+beEd0uxfWvMCA0kUGhj8lkuQztdSz6i99xiSU=”;
};
nativeBuildInputs = [ pkg-config automake autoconf libxml2 libusb1 libtool gettext ];
configurePhase = ‘’
./autogen.sh
./configure --prefix=$out
‘’;
meta = with lib; {
description = “Library to interact with Vita’s USB MTP protocol”;
homepage = “GitHub - codestation/vitamtp: Library to interact with Vita's USB MTP protocol (No longer maintained)”;
license = licenses.gpl3Only;
};
}
next is the derivation for the actual qcma package:
{ stdenv, lib, fetchFromGitHub, qtbase, libnotify, qmake, wrapQtAppsHook, pkg-config, callPackage }:
let
libvitamtp = callPackage ./…/libvitamtp/derivation.nix {};
in
stdenv.mkDerivation {
pname = “qcma”;
version = “0.4.1”;
src = fetchFromGitHub {
owner = “codestation”;
repo = “qcma”;
rev = “v0.4.1”;
hash = “sha256-eZ6ww01xaFSsD21PdInV2UXSNrYgfZEFzX9Z2c+TmZc=”;
};
buildInputs = [ qtbase libnotify libvitamtp ];
nativeBuildInputs = [ qmake wrapQtAppsHook pkg-config libvitamtp ];
qmakeFlags = [ “CONFIG+=DISABLE_FFMPEG” ];
meta = with lib; {
description = “Content Manager Assistant for the PS Vita”;
homepage = “GitHub - codestation/qcma: Cross-platform content manager assistant for the PS Vita (No longer maintained)”;
license = licenses.gpl3Only;
};
}
this derivation keeps giving the following error:
make: *** [Makefile:49: sub-common-make_first] Error 2
when checking line 49 in the makefile, this is what it says:
cd common/ && ( test -e Makefile || $(QMAKE) -o Makefile /build/source/common/common.pro PREFIX=/nix/store/7bgl8pfgikkm6mrnzlq00y8f6dwx0rjf-qcma-0.4.1 NIX_OUTPUT_OUT=/nix/store/7bgl8pfgikkm6mrnzlq00y8f6dwx0rjf-qcma-0.4.1 NIX_OUTPUT_DEV=/nix/store/7bgl8pfgikkm6mrnzlq00y8f6dwx0rjf-qcma-0.4.1 NIX_OUTPUT_BIN=/nix/store/7bgl8pfgikkm6mrnzlq00y8f6dwx0rjf-qcma-0.4.1 NIX_OUTPUT_DOC=/nix/store/7bgl8pfgikkm6mrnzlq00y8f6dwx0rjf-qcma-0.4.1/share/doc/qt-5.15.14 NIX_OUTPUT_QML=/nix/store/7bgl8pfgikkm6mrnzlq00y8f6dwx0rjf-qcma-0.4.1/lib/qt-5.15.14/qml NIX_OUTPUT_PLUGIN=/nix/store/7bgl8pfgikkm6mrnzlq00y8f6dwx0rjf-qcma-0.4.1/lib/qt-5.15.14/plugins CONFIG+=release CONFIG+=nostrip CONFIG+=DISABLE_FFMPEG ) && $(MAKE) -f Makefile
i honestly have no clue why it errors out here. i tried manually building the package on arch with the same config flags that nix uses by default and it builds just fine. only thing i can think of is that there’s something wrong with those nix variables, but i’m not knowledgeable on that.
edit: sorry for weird blockquotes, new here