nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchurl,
5 fpc,
6 lazarus,
7 atk,
8 cairo,
9 gdk-pixbuf,
10 glib,
11 gtk2,
12 libX11,
13 pango,
14}:
15
16stdenv.mkDerivation rec {
17 pname = "ddrescueview";
18 version = "0.4.5";
19
20 src = fetchurl {
21 url = "mirror://sourceforge/ddrescueview/ddrescueview-source-${version}.tar.xz";
22 sha256 = "sha256-Vzg8OU5iYSzip5lDiwDG48Rlwx+bqUDgd/Yk4ucChGU=";
23 };
24 sourceRoot = "ddrescueview-source-${version}/source";
25
26 nativeBuildInputs = [
27 fpc
28 lazarus
29 ];
30
31 buildInputs = [
32 atk
33 cairo
34 gdk-pixbuf
35 glib
36 gtk2
37 libX11
38 pango
39 ];
40
41 NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath buildInputs}";
42
43 buildPhase = ''
44 lazbuild --lazarusdir=${lazarus}/share/lazarus ddrescueview.lpi
45 '';
46
47 installPhase = ''
48 install -Dt $out/bin ddrescueview
49 cd ../resources/linux
50 mkdir -p "$out/share"
51 cp -ar applications icons man $out/share
52 '';
53
54 meta = with lib; {
55 description = "Tool to graphically examine ddrescue mapfiles";
56 homepage = "https://sourceforge.net/projects/ddrescueview/";
57 license = licenses.gpl3Plus;
58 platforms = platforms.linux;
59 maintainers = with maintainers; [ orivej ];
60 mainProgram = "ddrescueview";
61 };
62}