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:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,51 @@
|
|||
From d68fcb793d70032e978ecf8e0577eea955a741cf Mon Sep 17 00:00:00 2001
|
||||
From: worldofpeace <worldofpeace@protonmail.ch>
|
||||
Date: Sun, 10 Apr 2022 12:02:10 +0800
|
||||
Subject: [PATCH] meson: add options for tests installation dirs
|
||||
|
||||
---
|
||||
meson_options.txt | 6 ++++++
|
||||
tests/meson.build | 13 +++++++++++--
|
||||
2 files changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index b9a2fb5..4b8629f 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -23,3 +23,9 @@ option('tests', type: 'boolean',
|
||||
option('installed_tests', type: 'boolean',
|
||||
value: true,
|
||||
description: 'Install tests')
|
||||
+option('installed_test_datadir', type: 'string',
|
||||
+ value: '',
|
||||
+ description: 'Installation directory for data files in tests')
|
||||
+option('installed_test_bindir', type: 'string',
|
||||
+ value: '',
|
||||
+ description: 'Installation directory for binary files in tests')
|
||||
diff --git a/tests/meson.build b/tests/meson.build
|
||||
index 2b925e7..3276849 100644
|
||||
--- a/tests/meson.build
|
||||
+++ b/tests/meson.build
|
||||
@@ -21,8 +21,17 @@ unit_tests = [
|
||||
|
||||
gen_installed_test = find_program('gen-installed-test.py')
|
||||
|
||||
-installed_test_datadir = join_paths(get_option('prefix'), get_option('datadir'), 'installed-tests', graphene_api_path)
|
||||
-installed_test_bindir = join_paths(get_option('prefix'), get_option('libexecdir'), 'installed-tests', graphene_api_path)
|
||||
+installed_test_suffix = join_paths('installed-tests', graphene_api_path)
|
||||
+
|
||||
+installed_test_datadir = join_paths(get_option('installed_test_datadir'), installed_test_suffix)
|
||||
+if installed_test_datadir == ''
|
||||
+ installed_test_datadir = join_paths(get_option('prefix'), get_option('datadir'), installed_test_suffix)
|
||||
+endif
|
||||
+
|
||||
+installed_test_bindir = join_paths(get_option('installed_test_bindir'), installed_test_suffix)
|
||||
+if installed_test_bindir == ''
|
||||
+ installed_test_bindir = join_paths(get_option('prefix'), get_option('libexecdir'), installed_test_suffix)
|
||||
+endif
|
||||
|
||||
# Make tests conditional on having mutest-1 installed system-wide, or
|
||||
# available as a subproject
|
||||
--
|
||||
2.35.1
|
||||
|
||||
113
pkgs/development/libraries/graphene/default.nix
Normal file
113
pkgs/development/libraries/graphene/default.nix
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, nix-update-script
|
||||
, pkg-config
|
||||
, meson
|
||||
, ninja
|
||||
, python3
|
||||
, mutest
|
||||
, nixosTests
|
||||
, glib
|
||||
, gtk-doc
|
||||
, docbook_xsl
|
||||
, docbook_xml_dtd_43
|
||||
, gobject-introspection
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "graphene";
|
||||
version = "1.10.8";
|
||||
|
||||
outputs = [ "out" ]
|
||||
++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" "installedTests" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ebassi";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "P6JQhSktzvyMHatP/iojNGXPmcsxsFxdYerXzS23ojI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Add option for changing installation path of installed tests.
|
||||
./0001-meson-add-options-for-tests-installation-dirs.patch
|
||||
|
||||
# Disable flaky simd_operators_reciprocal test
|
||||
# https://github.com/ebassi/graphene/issues/246
|
||||
(fetchpatch {
|
||||
url = "https://github.com/ebassi/graphene/commit/4fbdd07ea3bcd0964cca3966010bf71cb6fa8209.patch";
|
||||
sha256 = "uFkkH0u4HuQ/ua1mfO7sJZ7MPrQdV/JON7mTYB4DW80=";
|
||||
includes = [ "tests/simd.c" ];
|
||||
revert = true;
|
||||
})
|
||||
];
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
docbook_xml_dtd_43
|
||||
docbook_xsl
|
||||
gtk-doc
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
gobject-introspection
|
||||
python3
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
mutest
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
|
||||
"-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}"
|
||||
"-Dinstalled_test_datadir=${placeholder "installedTests"}/share"
|
||||
"-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs tests/gen-installed-test.py
|
||||
'' + lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) ''
|
||||
PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py
|
||||
'';
|
||||
|
||||
postFixup = let
|
||||
introspectionPy = "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py";
|
||||
in ''
|
||||
if [ -x '${introspectionPy}' ] ; then
|
||||
wrapProgram '${introspectionPy}' \
|
||||
--prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0"
|
||||
fi
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
installedTests = nixosTests.installed-tests.graphene;
|
||||
};
|
||||
|
||||
updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A thin layer of graphic data types";
|
||||
homepage = "https://github.com/ebassi/graphene";
|
||||
license = licenses.mit;
|
||||
maintainers = teams.gnome.members ++ (with maintainers; [ ]);
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue