tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
geos: add package tests
Ivan Mincik
2 years ago
b703fb03
e2171789
+23
-3
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
geos
default.nix
tests.nix
+8
-3
pkgs/development/libraries/geos/default.nix
···
1
1
{ lib
2
2
-
, fetchurl
3
3
-
, fetchpatch
4
2
, stdenv
3
3
+
, callPackage
4
4
+
, fetchpatch
5
5
+
, fetchurl
5
6
, testers
7
7
+
6
8
, cmake
7
9
}:
8
10
···
29
31
30
32
doCheck = true;
31
33
32
32
-
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
34
34
+
passthru.tests = {
35
35
+
pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
36
36
+
geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; };
37
37
+
};
33
38
34
39
meta = with lib; {
35
40
description = "C/C++ library for computational geometry with a focus on algorithms used in geographic information systems (GIS) software";
+15
pkgs/development/libraries/geos/tests.nix
···
1
1
+
{ runCommand, geos }:
2
2
+
3
3
+
let
4
4
+
inherit (geos) pname;
5
5
+
in
6
6
+
runCommand "${geos}-tests" { meta.timeout = 60; }
7
7
+
''
8
8
+
${geos}/bin/geosop \
9
9
+
--explode \
10
10
+
--format wkt \
11
11
+
polygonize \
12
12
+
-a "MULTILINESTRING ((200 100, 100 100, 200 200), (200 200, 200 100), (200 200, 300 100, 200 100))" \
13
13
+
| grep 'POLYGON ((200 100, 100 100, 200 200, 200 100))'
14
14
+
touch $out
15
15
+
''