mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
proj: add package tests
Add simple package test by running proj CLI tool. This change also improves derivation overriding behavior by using `finalAttrs` function. Co-authored-by: Robert Scott <github@humanleg.org.uk>
This commit is contained in:
parent
ae11c6f4e5
commit
44daadff50
@ -5,6 +5,7 @@
|
||||
, cmake
|
||||
, pkg-config
|
||||
, buildPackages
|
||||
, callPackage
|
||||
, sqlite
|
||||
, libtiff
|
||||
, curl
|
||||
@ -13,7 +14,7 @@
|
||||
, python3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: rec {
|
||||
pname = "proj";
|
||||
version = "9.1.1";
|
||||
|
||||
@ -62,6 +63,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
passthru.tests = {
|
||||
python = python3.pkgs.pyproj;
|
||||
proj = callPackage ./tests.nix { proj = finalAttrs.finalPackage; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
@ -71,4 +73,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
11
pkgs/development/libraries/proj/tests.nix
Normal file
11
pkgs/development/libraries/proj/tests.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ runCommand, proj }:
|
||||
|
||||
let
|
||||
inherit (proj) pname;
|
||||
in
|
||||
runCommand "${pname}-tests" { meta.timeout = 60; }
|
||||
''
|
||||
${proj}/bin/projinfo EPSG:4326 \
|
||||
| grep '+proj=longlat +datum=WGS84 +no_defs +type=crs'
|
||||
touch $out
|
||||
''
|
Loading…
Reference in New Issue
Block a user