1{ lib
2, stdenv
3, fetchurl
4, python3Packages
5, flex
6, texinfo
7, libiconv
8, libintl
9}:
10
11stdenv.mkDerivation (finalAttrs: {
12 pname = "recode";
13 version = "3.7.14";
14
15 # Use official tarball, avoid need to bootstrap/generate build system
16 src = fetchurl {
17 url = "https://github.com/rrthomas/recode/releases/download/v${finalAttrs.version}/recode-${finalAttrs.version}.tar.gz";
18 hash = "sha256-eGqv1USFGisTsKN36sFQD4IM5iYVzMLmMLUB53Q7nzM=";
19 };
20
21 nativeBuildInputs = [ python3Packages.python flex texinfo libiconv ];
22
23 buildInputs = [ libintl ];
24
25 enableParallelBuilding = true;
26
27 doCheck = true;
28
29 nativeCheckInputs = with python3Packages; [
30 cython
31 setuptools
32 ];
33
34 meta = {
35 homepage = "https://github.com/rrthomas/recode";
36 description = "Converts files between various character sets and usages";
37 mainProgram = "recode";
38 changelog = "https://github.com/rrthomas/recode/raw/v${finalAttrs.version}/NEWS";
39 platforms = lib.platforms.unix;
40 license = with lib.licenses; [ lgpl3Plus gpl3Plus ];
41 maintainers = with lib.maintainers; [ jcumming ];
42 };
43})