nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, imagemagick, libpng }:
2
3stdenv.mkDerivation {
4 pname = "optar";
5 version = "20150210";
6
7 src = fetchurl {
8 url = "http://ronja.twibright.com/optar.tgz";
9 sha256 = "10lr31k3xfcpa6vxkbl3abph7j3gks2210489khnnzmhmfdnm1a4";
10 };
11
12 buildInputs = [ libpng ];
13
14 enableParallelBuilding = true;
15
16 postPatch = ''
17 substituteInPlace Makefile \
18 --replace /usr/local $out
19
20 substituteInPlace pgm2ps \
21 --replace 'convert ' "${lib.getBin imagemagick}/bin/convert "
22 '';
23
24 preInstall = ''
25 mkdir -p $out/bin
26 '';
27
28 meta = with lib; {
29 description = "OPTical ARchiver - it's a codec for encoding data on paper";
30 homepage = "http://ronja.twibright.com/optar/";
31 license = licenses.gpl2;
32 maintainers = with maintainers; [ peterhoeg ];
33 platforms = with platforms; linux; # possibly others, but only tested on Linux
34 };
35}