@@ -0,0 +1,66 @@
1+{ autoPatchelfHook, bzip2, cairo, coreutils, fetchurl, gdk-pixbuf, gnome2, gtk2, kcoreaddons, ki18n, kio, kservice, lib, qt4, qt511, qtbase, stdenv, runtimeShell }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "bcompare";
5+ version = "4.2.10.23938";
6+
7+ src = fetchurl {
8+ url = "https://www.scootersoftware.com/${pname}-${version}_amd64.deb";
9+ sha256 = "1825s1lbaj20d712czmaaqg7mkwfb650r53af2y30j29p6yd4wal";
10+ };
11+
12+ unpackPhase = ''
13+ ar x $src
14+ tar xfz data.tar.gz
15+ '';
16+
17+ installPhase = ''
18+ mkdir -p $out/bin $out/lib $out/share
19+ cp -R usr/share $out/
20+ cp -R usr/lib $out/
21+ cp -R usr/bin $out/
22+
23+ # Remove library that refuses to be autoPatchelf'ed
24+ rm $out/lib/beyondcompare/ext/bcompare_ext_kde.amd64.so
25+
26+ substituteInPlace $out/bin/bcompare \
27+ --replace "/usr/lib/beyondcompare" "$out/lib/beyondcompare" \
28+ --replace "/bin/bash" "${runtimeShell}"
29+
30+ # Create symlink bzip2 library
31+ ln -s ${bzip2.out}/lib/libbz2.so.1 $out/lib/beyondcompare/libbz2.so.1.0
32+ '';
33+
34+ nativeBuildInputs = [ autoPatchelfHook ];
35+
36+ buildInputs = [
37+ stdenv.cc.cc.lib
38+ gtk2
39+ gnome2.pango
40+ cairo
41+ kio
42+ kservice
43+ ki18n
44+ kcoreaddons
45+ gdk-pixbuf
46+ qt4
47+ bzip2
48+ ];
49+
50+ dontBuild = true;
51+ dontConfigure = true;
52+
53+ meta = with stdenv.lib; {
54+ description = "GUI application that allows to quickly and easily compare files and folders";
55+ longDescription = ''
56+ Beyond Compare is focused. Beyond Compare allows you to quickly and easily compare your files and folders.
57+ By using simple, powerful commands you can focus on the differences you're interested in and ignore those you're not.
58+ You can then merge the changes, synchronize your files, and generate reports for your records.
59+ '';
60+ homepage = "https://www.scootersoftware.com";
61+ license = licenses.unfree;
62+ maintainers = [ maintainers.ktor ];
63+ platforms = [ "x86_64-linux" ];
64+ };
65+
66+}