nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 84 lines 2.0 kB view raw
1{ 2 stdenv, 3 lib, 4 autoreconfHook, 5 fetchbzr, 6 fetchpatch, 7 pkg-config, 8 gtk3, 9 glib, 10 file, 11 gobject-introspection, 12 json-glib, 13 libsoup_3, 14}: 15 16stdenv.mkDerivation { 17 pname = "timezonemap"; 18 version = "0.4.5.1"; 19 20 src = fetchbzr { 21 url = "lp:timezonemap"; 22 rev = "58"; 23 sha256 = "sha256-wCJXwgnN+aZVerjQCm8oT3xIcwmc4ArcEoCh9pMrt+E="; 24 }; 25 26 patches = [ 27 # Fix crashes when running in GLib 2.76 28 # https://bugs.launchpad.net/ubuntu/+source/libtimezonemap/+bug/2012116 29 (fetchpatch { 30 url = "https://git.launchpad.net/ubuntu/+source/libtimezonemap/plain/debian/patches/timezone-map-Never-try-to-access-to-free-d-or-null-values.patch?id=88f72f724e63df061204f6818c9a1e7d8c003e29"; 31 sha256 = "sha256-M5eR0uaqpJOeW2Ya1Al+3ZciXukzHpnjJTMVvdO0dPE="; 32 }) 33 34 # Port to libsoup3 35 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068679 36 (fetchpatch { 37 url = "https://git.launchpad.net/ubuntu/+source/libtimezonemap/plain/debian/patches/port-to-libsoup3.patch?id=b8346a99d4abece742bce73780ccf0edfa0b99f0"; 38 hash = "sha256-BHLVA3Vcakl9COAiSPo0OyFOUz4ejsxB22gJW/+m7NI="; 39 }) 40 ]; 41 42 nativeBuildInputs = [ 43 pkg-config 44 autoreconfHook 45 gobject-introspection 46 ]; 47 48 buildInputs = [ 49 gtk3 50 glib 51 json-glib 52 libsoup_3 53 ]; 54 55 configureFlags = [ 56 "CFLAGS=-Wno-error" 57 "--sysconfdir=/etc" 58 "--localstatedir=/var" 59 ]; 60 61 installFlags = [ 62 "sysconfdir=${placeholder "out"}/etc" 63 "localstatedir=\${TMPDIR}" 64 ]; 65 66 preConfigure = '' 67 for f in {configure,m4/libtool.m4}; do 68 substituteInPlace $f\ 69 --replace /usr/bin/file ${file}/bin/file 70 done 71 ''; 72 73 postPatch = '' 74 sed "s|/usr/share/libtimezonemap|$out/share/libtimezonemap|g" -i ./src/tz.h 75 ''; 76 77 meta = with lib; { 78 homepage = "https://launchpad.net/timezonemap"; 79 description = "GTK+3 Timezone Map Widget"; 80 license = licenses.gpl2; 81 platforms = platforms.linux; 82 maintainers = [ maintainers.mkg20001 ]; 83 }; 84}