uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,83 @@
{ lib, stdenv
, fetchurl
, gettext
, gobject-introspection
, gtk-doc
, docbook_xsl
, docbook_xml_dtd_43
, pkg-config
, meson
, ninja
, git
, vala
, glib
, zlib
, gnome
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "gcab";
version = "1.4";
outputs = [ "bin" "out" "dev" "devdoc" "installedTests" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "13q43iqld4l50yra45lhvkd376pn6qpk7rkx374zn8y9wsdzm9b7";
};
patches = [
# allow installing installed tests to a separate output
./installed-tests-path.patch
];
nativeBuildInputs = [
meson
ninja
git
pkg-config
vala
gettext
gobject-introspection
gtk-doc
docbook_xsl
docbook_xml_dtd_43
];
buildInputs = [
glib
zlib
];
# required by libgcab-1.0.pc
propagatedBuildInputs = [
glib
];
mesonFlags = [
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
];
doCheck = true;
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "none";
};
tests = {
installedTests = nixosTests.installed-tests.gcab;
};
};
meta = with lib; {
description = "GObject library to create cabinet files";
homepage = "https://gitlab.gnome.org/GNOME/gcab";
license = licenses.lgpl21Plus;
maintainers = teams.gnome.members;
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,21 @@
diff --git a/meson_options.txt b/meson_options.txt
index c1b1da1..9b76022 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,3 +4,4 @@
option('vapi', type : 'boolean', value : true, description: 'generate Vala bindings (requires introspection)')
option('tests', type : 'boolean', value : true, description : 'enable tests')
option('installed_tests', type : 'boolean', value : false, description : 'install tests for "as-installed" testing')
+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
diff --git a/tests/meson.build b/tests/meson.build
index 1e46e2a..aa780d0 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,5 +1,5 @@
-installed_tests_metadir = join_paths(get_option('datadir'), 'installed-tests', 'libgcab-1.0')
-installed_tests_execdir = join_paths(get_option('libexecdir'), 'installed-tests', 'libgcab-1.0')
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 'libgcab-1.0')
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', 'libgcab-1.0')
installed_tests_enabled = get_option('installed_tests')
installed_tests_template_tap = files('template-tap.test.in')
abs_installed_tests_execdir = join_paths(get_option('prefix'), installed_tests_execdir)