libjcat: init at 0.1.1

This commit is contained in:
Jan Tojnar 2020-03-30 07:37:07 +02:00
parent a584339faf
commit 1fade973fc
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
5 changed files with 123 additions and 0 deletions

View file

@ -91,6 +91,7 @@ in
ibus = callInstalledTest ./ibus.nix {};
libgdata = callInstalledTest ./libgdata.nix {};
glib-testing = callInstalledTest ./glib-testing.nix {};
libjcat = callInstalledTest ./libjcat.nix {};
libxmlb = callInstalledTest ./libxmlb.nix {};
malcontent = callInstalledTest ./malcontent.nix {};
ostree = callInstalledTest ./ostree.nix {};

View file

@ -0,0 +1,5 @@
{ pkgs, makeInstalledTest, ... }:
makeInstalledTest {
tested = pkgs.libjcat;
}

View file

@ -0,0 +1,91 @@
{ stdenv
, fetchFromGitHub
, fetchpatch
, docbook_xml_dtd_43
, docbook-xsl-nons
, glib
, json-glib
, gnutls
, gpgme
, gobject-introspection
, vala
, help2man
, gtk-doc
, meson
, ninja
, pkg-config
, python3
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "libjcat";
version = "0.1.1";
outputs = [ "bin" "out" "dev" "devdoc" "man" "installedTests" ];
src = fetchFromGitHub {
owner = "hughsie";
repo = "libjcat";
rev = version;
sha256 = "hWJUzpQvy2V4pS8C/nW7Xrs9U9LQWMsGuTVOnm5UJc0=";
};
patches = [
# Installed tests are installed to different output
./installed-tests-path.patch
# Fix version file generation
(fetchpatch {
url = "https://github.com/hughsie/libjcat/commit/cf2d9298a5fab7278ee040bc0b4be384a7b5538e.patch";
sha256 = "3749qih+wfhU8ECklh5BvReJ7pS+Ao1Q7YueZ1tT0Is=";
})
];
nativeBuildInputs = [
meson
ninja
pkg-config
docbook_xml_dtd_43
docbook-xsl-nons
gobject-introspection
vala
help2man
gtk-doc
(python3.withPackages (pkgs: with pkgs; [
setuptools
]))
];
buildInputs = [
glib
json-glib
gnutls
gpgme
];
mesonFlags = [
"-Dgtkdoc=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
];
postPatch = ''
patchShebangs contrib/generate-version-script.py
'';
doCheck = true;
passthru = {
tests = {
installed-tests = nixosTests.installed-tests.libjcat;
};
};
meta = with stdenv.lib; {
description = "Library for reading and writing Jcat files";
homepage = "https://github.com/hughsie/libjcat";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,24 @@
diff --git a/meson.build b/meson.build
index f69968d..d1d6c6e 100644
--- a/meson.build
+++ b/meson.build
@@ -114,8 +114,8 @@ else
datadir = join_paths(prefix, get_option('datadir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
- installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
- installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
+ installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
+ installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
endif
mandir = join_paths(prefix, get_option('mandir'))
localedir = join_paths(prefix, get_option('localedir'))
diff --git a/meson_options.txt b/meson_options.txt
index 4784300..d382fc1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,4 @@
+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
option('gtkdoc', type : 'boolean', value : false, description : 'enable developer documentation')
option('introspection', type : 'boolean', value : true, description : 'generate GObject Introspection data')
option('tests', type : 'boolean', value : true, description : 'enable tests')

View file

@ -12981,6 +12981,8 @@ in
libiptcdata = callPackage ../development/libraries/libiptcdata { };
libjcat = callPackage ../development/libraries/libjcat { };
libjpeg_original = callPackage ../development/libraries/libjpeg { };
libjpeg_turbo = callPackage ../development/libraries/libjpeg-turbo { };
libjpeg_drop = callPackage ../development/libraries/libjpeg-drop { };