2020-03-21 11:16:05 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, bison
|
|
|
|
, pkgconfig
|
|
|
|
, gettext
|
|
|
|
, desktop-file-utils
|
|
|
|
, glib
|
|
|
|
, gtk2
|
|
|
|
, libxml2
|
|
|
|
, libbfd
|
|
|
|
, zlib
|
|
|
|
, binutils
|
|
|
|
, gnutls
|
|
|
|
, enableGui ? true
|
2019-05-28 13:54:17 +01:00
|
|
|
}:
|
2006-04-18 19:46:36 +01:00
|
|
|
|
2019-05-28 13:54:17 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gtk-gnutella";
|
2020-03-21 11:16:05 +00:00
|
|
|
# NOTE: Please remove hardeningDisable on the next release, see:
|
|
|
|
# https://sourceforge.net/p/gtk-gnutella/bugs/555/#5c19
|
2020-07-13 09:22:37 +01:00
|
|
|
version = "1.2.0";
|
2011-08-29 21:26:26 +01:00
|
|
|
|
2020-03-21 11:16:05 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gtk-gnutella";
|
|
|
|
repo = "gtk-gnutella";
|
|
|
|
rev = "v${version}";
|
2020-07-13 09:22:37 +01:00
|
|
|
sha256 = "0j596dpajk68bkry0gmpqawsi61rphfciy4vji1dh890jyhkhdgy";
|
2011-08-29 21:26:26 +01:00
|
|
|
};
|
|
|
|
|
2020-03-21 11:16:05 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
bison
|
|
|
|
desktop-file-utils
|
|
|
|
gettext
|
|
|
|
pkgconfig
|
2019-05-28 13:54:17 +01:00
|
|
|
];
|
2020-03-21 11:16:05 +00:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gnutls
|
|
|
|
libbfd
|
|
|
|
libxml2
|
|
|
|
zlib
|
|
|
|
]
|
|
|
|
++
|
|
|
|
stdenv.lib.optionals (enableGui) [ gtk2 ]
|
|
|
|
;
|
2019-05-28 13:54:17 +01:00
|
|
|
|
|
|
|
configureScript = "./build.sh";
|
2020-03-21 11:16:05 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--configure-only"
|
|
|
|
# See https://sourceforge.net/p/gtk-gnutella/bugs/555/
|
|
|
|
"--disable-malloc"
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optionals (!enableGui) [ "--topless" ]
|
|
|
|
;
|
2011-08-29 21:26:26 +01:00
|
|
|
|
2016-09-01 18:53:17 +01:00
|
|
|
hardeningDisable = [ "bindnow" "fortify" "pic" "relro" ];
|
|
|
|
|
2019-05-28 13:54:17 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm0444 src/${pname}.man $out/share/man/man1/${pname}.1
|
|
|
|
'';
|
2011-08-29 21:26:26 +01:00
|
|
|
|
2016-01-13 00:43:57 +00:00
|
|
|
meta = with stdenv.lib; {
|
2019-09-03 23:49:40 +01:00
|
|
|
description = "A GTK Gnutella client, optimized for speed and scalability";
|
2019-05-28 13:54:17 +01:00
|
|
|
homepage = "http://gtk-gnutella.sourceforge.net/"; # Code: https://github.com/gtk-gnutella/gtk-gnutella
|
|
|
|
changelog = "https://raw.githubusercontent.com/gtk-gnutella/gtk-gnutella/v${version}/ChangeLog";
|
2020-03-21 11:16:05 +00:00
|
|
|
maintainers = [ maintainers.doronbehar ];
|
2019-05-28 13:54:17 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = platforms.unix;
|
2006-04-18 19:46:36 +01:00
|
|
|
};
|
|
|
|
}
|