From 50d76dfd24382998d2b143bf5177785bd230fb29 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 3 Sep 2016 00:45:11 +0200 Subject: [PATCH] m 5 qcma:init --- 5pkgs/default.nix | 1 + 5pkgs/qcma/default.nix | 64 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 5pkgs/qcma/default.nix diff --git a/5pkgs/default.nix b/5pkgs/default.nix index 99f401f..0d375a5 100644 --- a/5pkgs/default.nix +++ b/5pkgs/default.nix @@ -24,6 +24,7 @@ in sha256 = "18ddzyh11bywrhzdkzvrl7nvgp5gdb4k1s0zxbz2bkhd14vi72bb"; }; }; + qcma = pkgs.qt5.callPackage ./qcma {}; tw-upload-plugin = callPackage ./tw-upload-plugin {}; skytraq-logger = callPackage ./skytraq-logger {}; taskserver = callPackage ./taskserver {}; diff --git a/5pkgs/qcma/default.nix b/5pkgs/qcma/default.nix new file mode 100644 index 0000000..6eb1a97 --- /dev/null +++ b/5pkgs/qcma/default.nix @@ -0,0 +1,64 @@ +{ lib, stdenv, fetchFromGitHub, fetchgit, libusb, libtool, autoconf, pkgconfig, git, +gettext, automake, libxml2 , qmakeHook, makeQtWrapper, +qtbase, qttools, qtmultimedia, libnotify, ffmpeg, gdk_pixbuf }: +let + libvitamtp = stdenv.mkDerivation rec { + name = "libvitamtp-${version}"; + version = "2.5.9"; + + src = fetchFromGitHub { + owner = "codestation"; + repo = "vitamtp"; + rev = "v"+version; + sha256 = "09c9f7gqpyicfpnhrfb4r67s2hci6hh31bzmqlpds4fywv5mzaf8"; + }; + + buildInputs = [ libusb libxml2 libtool autoconf automake gettext pkgconfig ]; + preConfigure = "sh ./autogen.sh"; + + meta = { + description = "Content Manager Assistant for the PS Vita"; + homepage = https://github.com/codestation/qcma; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ makefu ]; + }; + }; +in stdenv.mkDerivation rec { + name = "qcma-${version}"; + version = "0.3.13"; + + src = fetchgit { + url = "git://github.com/codestation/qcma.git"; + rev = "refs/tags/v"+version; + leaveDotGit = true; + sha256 = "164abjwlw2nw2i30wlwpsavz1zjkp6a14yprvinma5hflkw4yj6i"; + }; + + preConfigure = '' + lrelease common/resources/translations/*.ts + ''; + + # TODO: manually adding qtbase and qtmultimedia to the library path is shit, + # this should be done somewhere before when building the project, idk. + installPhase = '' + make INSTALL_ROOT="$(out)" install + for i in qcma qcma_cli; do + wrapQtProgram $out/bin/$i --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ + qtbase qtmultimedia ]} + done + ''; + + enableParallelBuilding = true; + + buildInputs = [ gdk_pixbuf ffmpeg libnotify libvitamtp git qtmultimedia qtbase ]; + nativeBuildInputs = [ qmakeHook qttools pkgconfig makeQtWrapper ]; + + meta = { + description = "Content Manager Assistant for the PS Vita"; + homepage = https://github.com/codestation/qcma; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ makefu ]; + }; +}