diff options
author | Richard Zetterberg <rzetterberg@users.noreply.github.com> | 2016-07-23 00:41:02 +0200 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2016-07-23 00:41:02 +0200 |
commit | 5c56c906e308f168c13605e8c15efa499933cc01 (patch) | |
tree | 1afdd6f253ee17168097e466a0eb800c77ad7a67 /pkgs/development/libraries/libui | |
parent | c38e6a2a6060434d842f173ebe5a4a7d4d99781a (diff) | |
download | nixlib-5c56c906e308f168c13605e8c15efa499933cc01.tar nixlib-5c56c906e308f168c13605e8c15efa499933cc01.tar.gz nixlib-5c56c906e308f168c13605e8c15efa499933cc01.tar.bz2 nixlib-5c56c906e308f168c13605e8c15efa499933cc01.tar.lz nixlib-5c56c906e308f168c13605e8c15efa499933cc01.tar.xz nixlib-5c56c906e308f168c13605e8c15efa499933cc01.tar.zst nixlib-5c56c906e308f168c13605e8c15efa499933cc01.zip |
Adds pkg-config file and headers (#17173)
Diffstat (limited to 'pkgs/development/libraries/libui')
-rw-r--r-- | pkgs/development/libraries/libui/default.nix | 53 | ||||
-rw-r--r-- | pkgs/development/libraries/libui/libui.pc | 11 |
2 files changed, 44 insertions, 20 deletions
diff --git a/pkgs/development/libraries/libui/default.nix b/pkgs/development/libraries/libui/default.nix index 5fabd1275801..50c42f4f10b2 100644 --- a/pkgs/development/libraries/libui/default.nix +++ b/pkgs/development/libraries/libui/default.nix @@ -1,25 +1,38 @@ { stdenv, fetchgit, cmake, pkgconfig, gtk3 }: -stdenv.mkDerivation rec { - version = "3.1.a"; - name = "libui-${version}"; - src = fetchgit { - url = "https://github.com/andlabs/libui.git"; - rev = "6ebdc96b93273c3cedf81159e7843025caa83058"; - sha256 = "1lpbfa298c61aarlzgp7vghrmxg1274pzxh1j9isv8x758gk6mfn"; - }; +let + shortName = "libui"; + version = "3.1a"; +in + stdenv.mkDerivation rec { + name = "${shortName}-${version}"; + src = fetchgit { + url = "https://github.com/andlabs/libui.git"; + rev = "6ebdc96b93273c3cedf81159e7843025caa83058"; + sha256 = "1lpbfa298c61aarlzgp7vghrmxg1274pzxh1j9isv8x758gk6mfn"; + }; - buildInputs = [ cmake pkgconfig gtk3 ]; + buildInputs = [ cmake pkgconfig gtk3 ]; - installPhase = '' - mkdir -p $out - mv ./out/libui.so.0 $out/libui.so.0 - ''; + installPhase = '' + mkdir -p $out/{include,lib} + mkdir -p $out/lib/pkgconfig - meta = with stdenv.lib; { - description = "Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports."; - homepage = https://github.com/andlabs/libui; - platforms = platforms.linux; - license = licenses.mit; - }; -} + mv ./out/${shortName}.so.0 $out/lib/ + ln -s $out/lib/${shortName}.so.0 $out/lib/${shortName}.so + + cp $src/ui.h $out/include + cp $src/ui_unix.h $out/include + + cp ${./libui.pc} $out/lib/pkgconfig/${shortName}.pc + substituteInPlace $out/lib/pkgconfig/${shortName}.pc \ + --subst-var-by out $out \ + --subst-var-by version "${version}" + ''; + + meta = { + homepage = https://github.com/andlabs/libui; + description = "Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports."; + platforms = stdenv.lib.platforms.linux; + }; + } diff --git a/pkgs/development/libraries/libui/libui.pc b/pkgs/development/libraries/libui/libui.pc new file mode 100644 index 000000000000..42ee86fb550f --- /dev/null +++ b/pkgs/development/libraries/libui/libui.pc @@ -0,0 +1,11 @@ +prefix=@out@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${exec_prefix}/include + +Name: libui +Description: Simple and portable (but not inflexible) GUI library +Version: @version@ + +Libs: -L${libdir} -lui +Cflags: -I${includedir} |