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