nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

glib-testing: init at 0.1.0

authored by

Jan Tojnar and committed by
worldofpeace
ea06e005 f9bc0832

+103
+1
nixos/tests/installed-tests/default.nix
··· 90 90 graphene = callInstalledTest ./graphene.nix {}; 91 91 ibus = callInstalledTest ./ibus.nix {}; 92 92 libgdata = callInstalledTest ./libgdata.nix {}; 93 + glib-testing = callInstalledTest ./glib-testing.nix {}; 93 94 libxmlb = callInstalledTest ./libxmlb.nix {}; 94 95 ostree = callInstalledTest ./ostree.nix {}; 95 96 xdg-desktop-portal = callInstalledTest ./xdg-desktop-portal.nix {};
+5
nixos/tests/installed-tests/glib-testing.nix
··· 1 + { pkgs, makeInstalledTest, ... }: 2 + 3 + makeInstalledTest { 4 + tested = pkgs.glib-testing; 5 + }
+63
pkgs/development/libraries/glib-testing/default.nix
··· 1 + { stdenv 2 + , fetchFromGitLab 3 + , meson 4 + , ninja 5 + , pkgconfig 6 + , gtk-doc 7 + , docbook-xsl-nons 8 + , docbook_xml_dtd_43 9 + , glib 10 + , nixosTests 11 + }: 12 + 13 + stdenv.mkDerivation rec { 14 + pname = "glib-testing"; 15 + version = "0.1.0"; 16 + 17 + outputs = [ "out" "dev" "devdoc" "installedTests" ]; 18 + 19 + src = fetchFromGitLab { 20 + domain = "gitlab.gnome.org"; 21 + owner = "pwithnall"; 22 + repo = "libglib-testing"; 23 + rev = version; 24 + sha256 = "0xmycsrlqyji6sc2i4wvp2gxf3897z65a57ygihfnpjpyl7zlwkr"; 25 + }; 26 + 27 + patches = [ 28 + # allow installing installed tests to a separate output 29 + ./installed-tests-path.patch 30 + ]; 31 + 32 + nativeBuildInputs = [ 33 + meson 34 + ninja 35 + pkgconfig 36 + gtk-doc 37 + docbook-xsl-nons 38 + docbook_xml_dtd_43 39 + ]; 40 + 41 + propagatedBuildInputs = [ 42 + glib 43 + ]; 44 + 45 + mesonFlags = [ 46 + "-Dinstalled_tests=true" 47 + "-Dinstalled_test_prefix=${placeholder "installedTests"}" 48 + ]; 49 + 50 + passthru = { 51 + tests = { 52 + installedTests = nixosTests.installed-tests.glib-testing; 53 + }; 54 + }; 55 + 56 + meta = with stdenv.lib; { 57 + description = "Test library providing test harnesses and mock classes complementing the classes provided by GLib"; 58 + homepage = "https://gitlab.gnome.org/pwithnall/libglib-testing"; 59 + license = licenses.lgpl21Plus; 60 + maintainers = with maintainers; [ jtojnar ]; 61 + platforms = platforms.unix; 62 + }; 63 + }
+32
pkgs/development/libraries/glib-testing/installed-tests-path.patch
··· 1 + diff --git a/libglib-testing/tests/meson.build b/libglib-testing/tests/meson.build 2 + index 4789c63..2b8525d 100644 3 + --- a/libglib-testing/tests/meson.build 4 + +++ b/libglib-testing/tests/meson.build 5 + @@ -15,9 +15,9 @@ test_programs = [ 6 + ['signal-logger', [], deps], 7 + ] 8 + 9 + -installed_tests_metadir = join_paths(datadir, 'installed-tests', 10 + +installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 11 + 'libglib-testing-' + libglib_testing_api_version) 12 + -installed_tests_execdir = join_paths(libexecdir, 'installed-tests', 13 + +installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', 14 + 'libglib-testing-' + libglib_testing_api_version) 15 + 16 + foreach program: test_programs 17 + @@ -48,4 +48,4 @@ foreach program: test_programs 18 + exe, 19 + env: envs, 20 + ) 21 + -endforeach 22 + \ No newline at end of file 23 + +endforeach 24 + diff --git a/meson_options.txt b/meson_options.txt 25 + index e69263e..7cb1ee8 100644 26 + --- a/meson_options.txt 27 + +++ b/meson_options.txt 28 + @@ -4,3 +4,4 @@ option( 29 + value: false, 30 + description: 'enable installed tests' 31 + ) 32 + +option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
+2
pkgs/top-level/all-packages.nix
··· 11738 11738 11739 11739 glib-networking = callPackage ../development/libraries/glib-networking {}; 11740 11740 11741 + glib-testing = callPackage ../development/libraries/glib-testing { }; 11742 + 11741 11743 glirc = haskell.lib.justStaticExecutables haskellPackages.glirc; 11742 11744 11743 11745 gom = callPackage ../development/libraries/gom { };