librevenge: refactor

This commit is contained in:
Felix Buehler 2021-12-21 12:53:47 +01:00
parent 459f9fe2be
commit 2103bd33f3
2 changed files with 17 additions and 27 deletions

View file

@ -1,25 +1,20 @@
{lib, stdenv, fetchurl, boost, pkg-config, cppunit, zlib}:
let
s = # Generated upstream information
rec {
baseName="librevenge";
version="0.0.4";
name="${baseName}-${version}";
hash="1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk";
url="mirror://sourceforge/project/libwpd/librevenge/librevenge-0.0.4/librevenge-0.0.4.tar.xz";
sha256="1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk";
{ lib, stdenv, fetchurl, boost, pkg-config, cppunit, zlib }:
stdenv.mkDerivation rec {
pname = "librevenge";
version = "0.0.4";
src = fetchurl {
url = "mirror://sourceforge/project/libwpd/librevenge/librevenge-${version}/librevenge-${version}.tar.xz";
sha256 = "sha256-kz8HKfBCZ8w1S5oCvD6a/vpVEqO90LRfFZ7hSj4zR7I=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
boost cppunit zlib
boost
cppunit
zlib
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit nativeBuildInputs buildInputs;
src = fetchurl {
inherit (s) url sha256;
};
# Clang and gcc-7 generate warnings, and
# -Werror causes these warnings to be interpreted as errors
@ -32,11 +27,10 @@ stdenv.mkDerivation {
sed -i 's,-DLIBREVENGE_BUILD,\0 -DBOOST_ERROR_CODE_HEADER_ONLY,g' src/lib/Makefile.in
'';
meta = {
inherit (s) version;
meta = with lib; {
description = "A base library for writing document import filters";
license = lib.licenses.mpl20 ;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.unix;
license = licenses.mpl20;
maintainers = with maintainers; [ raskin ];
platforms = platforms.unix;
};
}

View file

@ -1,4 +0,0 @@
url https://sourceforge.net/projects/libwpd/files/librevenge/
SF_version_dir librevenge-
version_link '[.]tar.xz/download$'
SF_redirect