nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 libjpeg,
6 libpng,
7 ncurses,
8 autoreconfHook,
9 autoconf-archive,
10 pkg-config,
11 bash-completion,
12 libwebp,
13 libexif,
14}:
15
16stdenv.mkDerivation (finalAttrs: {
17 version = "1.3.3";
18 pname = "jp2a";
19
20 src = fetchFromGitHub {
21 owner = "Talinx";
22 repo = "jp2a";
23 tag = "v${finalAttrs.version}";
24 hash = "sha256-GvPRLYrqZyzk24RmJJ1VcnXo6uda50qqqRA/pioPm5Q=";
25 };
26
27 makeFlags = [ "PREFIX=$(out)" ];
28
29 nativeBuildInputs = [
30 autoreconfHook
31 autoconf-archive
32 pkg-config
33 bash-completion
34 ];
35
36 buildInputs = [
37 libjpeg
38 libpng
39 ncurses
40 libwebp
41 libexif
42 ];
43
44 installFlags = [ "bashcompdir=\${out}/share/bash-completion/completions" ];
45
46 meta = {
47 broken = stdenv.hostPlatform.isDarwin;
48 homepage = "https://github.com/Talinx/jp2a";
49 description = "Small utility that converts JPG images to ASCII";
50 license = lib.licenses.gpl2Only;
51 maintainers = [ lib.maintainers.FlorianFranzen ];
52 platforms = lib.platforms.unix;
53 mainProgram = "jp2a";
54 };
55})