Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, stdenv
3, fetchurl
4, fetchpatch
5, meson
6, ninja
7, vala
8, gobject-introspection
9, perl
10, bison
11, gettext
12, glib
13, pkg-config
14, libgsf
15, gcab
16, bzip2
17, gnome
18}:
19
20stdenv.mkDerivation rec {
21 pname = "msitools";
22 version = "0.101";
23
24 src = fetchurl {
25 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
26 sha256 = "DMTS4NEI+m8rQIW5qX3VvG2fyt7N2TPyCU+Guv2+hf4=";
27 };
28
29 patches = [
30 # Fix executable bit on tools (regression in Meson migration).
31 (fetchpatch {
32 url = "https://gitlab.gnome.org/GNOME/msitools/commit/25c4353cf173cddeb76c0a2dd6621bcb753cabf8.patch";
33 sha256 = "VknfZCCn4jxwn9l9noXdGczv2kV+IbOsw9cNBE67P1U=";
34 })
35
36 # Fix failure on big-endian platforms.
37 # https://gitlab.gnome.org/GNOME/msitools/issues/31
38 (fetchpatch {
39 url = "https://gitlab.gnome.org/skitt/msitools/commit/3668c8288085d5beefae7c1387330ce9599b8365.patch";
40 sha256 = "x3Mp+9TRqBAJIdzVn68HyYt0lujyMk5h5xSBUQHe9Oo=";
41 })
42 ];
43
44 nativeBuildInputs = [
45 meson
46 ninja
47 vala
48 gobject-introspection
49 perl
50 bison
51 gettext
52 pkg-config
53 ];
54
55 buildInputs = [
56 glib
57 libgsf
58 gcab
59 bzip2
60 ];
61
62 # WiX tests fail on darwin
63 doCheck = !stdenv.isDarwin;
64
65 postPatch = ''
66 patchShebangs subprojects/bats-core/{bin,libexec}
67 '';
68
69 passthru = {
70 updateScript = gnome.updateScript {
71 packageName = pname;
72 versionPolicy = "none";
73 };
74 };
75
76 meta = with lib; {
77 description = "Set of programs to inspect and build Windows Installer (.MSI) files";
78 homepage = "https://wiki.gnome.org/msitools";
79 license = with licenses; [
80 # Library
81 lgpl21Plus
82 # Tools
83 gpl2Plus
84 ];
85 maintainers = with maintainers; [ PlushBeaver ];
86 platforms = platforms.unix;
87 };
88}