gcab: run & install tests

also add nixosTests.installed-tests.gcab for running the installed tests
This commit is contained in:
Jan Tojnar
2019-11-07 14:07:19 +01:00
parent c88e084ecb
commit e253d015a1
4 changed files with 42 additions and 2 deletions
+15 -2
View File
@@ -13,19 +13,25 @@
, glib
, zlib
, gnome3
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "gcab";
version = "1.3";
outputs = [ "bin" "out" "dev" "devdoc" ];
outputs = [ "bin" "out" "dev" "devdoc" "installedTests" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1rv81b37d5ya7xpfdxrfk173jjcwabxyng7vafgwyl5myv44qc0h";
};
patches = [
# allow installing installed tests to a separate output
./installed-tests-path.patch
];
nativeBuildInputs = [
meson
ninja
@@ -45,14 +51,21 @@ stdenv.mkDerivation rec {
];
mesonFlags = [
"-Dtests=false"
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder ''installedTests''}"
];
doCheck = true;
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
versionPolicy = "none";
};
tests = {
installedTests = nixosTests.installed-tests.gcab;
};
};
meta = with stdenv.lib; {