diff options
author | sternenseemann <sternenseemann@systemli.org> | 2023-11-05 16:55:04 +0100 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2023-11-05 16:55:04 +0100 |
commit | e3235021ec0999f11112d86084a15ca7df4bf29e (patch) | |
tree | e46795f3d611cfccf0d1ce2b712237123fda46e2 | |
parent | d32cb37277093e405e93e3cd69807a3a07873e80 (diff) | |
download | nixpkgs-e3235021ec0999f11112d86084a15ca7df4bf29e.tar nixpkgs-e3235021ec0999f11112d86084a15ca7df4bf29e.tar.gz nixpkgs-e3235021ec0999f11112d86084a15ca7df4bf29e.tar.bz2 nixpkgs-e3235021ec0999f11112d86084a15ca7df4bf29e.tar.lz nixpkgs-e3235021ec0999f11112d86084a15ca7df4bf29e.tar.xz nixpkgs-e3235021ec0999f11112d86084a15ca7df4bf29e.tar.zst nixpkgs-e3235021ec0999f11112d86084a15ca7df4bf29e.zip |
SDL2_gfx: record provided pkg-config modules in meta
This is verified using testers.hasPkgConfigModules which leads to a slight refactor of the expression.
-rw-r--r-- | pkgs/development/libraries/SDL2_gfx/default.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/development/libraries/SDL2_gfx/default.nix b/pkgs/development/libraries/SDL2_gfx/default.nix index 3d599c39c05..83b57b42c7c 100644 --- a/pkgs/development/libraries/SDL2_gfx/default.nix +++ b/pkgs/development/libraries/SDL2_gfx/default.nix @@ -1,11 +1,11 @@ -{ lib, stdenv, darwin, fetchurl, pkg-config, SDL2 }: +{ lib, stdenv, darwin, fetchurl, pkg-config, SDL2, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "SDL2_gfx"; version = "1.0.4"; src = fetchurl { - url = "http://www.ferzkopp.net/Software/${pname}/${pname}-${version}.tar.gz"; + url = "http://www.ferzkopp.net/Software/${finalAttrs.pname}/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; sha256 = "0qk2ax7f7grlxb13ba0ll3zlm8780s7j8fmrhlpxzjgdvldf1q33"; }; @@ -17,6 +17,10 @@ stdenv.mkDerivation rec { configureFlags = [(if stdenv.hostPlatform.isx86 then "--enable-mmx" else "--disable-mmx")] ++ lib.optional stdenv.isDarwin "--disable-sdltest"; + passthru.tests.pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + }; + meta = with lib; { description = "SDL graphics drawing primitives and support functions"; @@ -42,5 +46,6 @@ stdenv.mkDerivation rec { license = licenses.zlib; maintainers = with maintainers; [ cpages ]; platforms = platforms.unix; + pkgConfigModules = [ "SDL2_gfx" ]; }; -} +}) |