Merge pull request #132406 from SuperSandro2000/cleanup

This commit is contained in:
Sandro 2021-08-02 13:35:25 +00:00 committed by GitHub
commit f427121142
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 94 additions and 58 deletions

View file

@ -1,38 +1,57 @@
{ fetchFromGitHub, lib, stdenv, pkg-config, autoreconfHook, wrapQtAppsHook ? null
, openssl, db48, boost, zlib, miniupnpc, gmp
, qrencode, glib, protobuf, yasm, libevent
, util-linux, qtbase ? null, qttools ? null
{ fetchFromGitHub
, lib
, stdenv
, pkg-config
, autoreconfHook
, wrapQtAppsHook
, openssl
, db48
, boost
, zlib
, miniupnpc
, gmp
, qrencode
, glib
, protobuf
, yasm
, libevent
, util-linux
, qtbase
, qttools
, enableUpnp ? false
, disableWallet ? false
, disableDaemon ? false
, withGui ? false }:
, withGui ? false
}:
with lib;
stdenv.mkDerivation rec {
name = "pivx-${version}";
pname = "pivx";
version = "4.1.1";
src = fetchFromGitHub {
owner = "PIVX-Project";
repo= "PIVX";
repo = "PIVX";
rev = "v${version}";
sha256 = "03ndk46h6093v8s18d5iffz48zhlshq7jrk6vgpjfs6z2iqgd2sy";
};
nativeBuildInputs = [ pkg-config autoreconfHook ] ++ optionals withGui [ wrapQtAppsHook ];
nativeBuildInputs = [ pkg-config autoreconfHook ]
++ lib.optionals withGui [ wrapQtAppsHook ];
buildInputs = [ glib gmp openssl db48 yasm boost zlib libevent miniupnpc protobuf util-linux ]
++ optionals withGui [ qtbase qttools qrencode ];
++ lib.optionals withGui [ qtbase qttools qrencode ];
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
++ optional enableUpnp "--enable-upnp-default"
++ optional disableWallet "--disable-wallet"
++ optional disableDaemon "--disable-daemon"
++ optionals withGui [ "--with-gui=yes"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
++ lib.optional enableUpnp "--enable-upnp-default"
++ lib.optional disableWallet "--disable-wallet"
++ lib.optional disableDaemon "--disable-daemon"
++ lib.optionals withGui [
"--with-gui=yes"
"--with-qt-bindir=${lib.getDev qtbase}/bin:${lib.getDev qttools}/bin"
];
enableParallelBuilding = true;
doChecks = true;
doCheck = true;
postBuild = ''
mkdir -p $out/share/applications $out/share/icons
cp contrib/debian/pivx-qt.desktop $out/share/applications/

View file

@ -1,6 +1,18 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, buildPackages
, cmake, zlib, c-ares, pkg-config, re2, openssl, protobuf, grpc
, abseil-cpp, libnsl
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, buildPackages
, cmake
, zlib
, c-ares
, pkg-config
, re2
, openssl
, protobuf
, grpc
, abseil-cpp
, libnsl
}:
stdenv.mkDerivation rec {

View file

@ -3,8 +3,6 @@
, autoreconfHook, nixosTests
}:
let inherit (lib) optional optionals; in
stdenv.mkDerivation rec {
pname = "knot-dns";
version = "3.1.0";
@ -39,12 +37,10 @@ stdenv.mkDerivation rec {
libmnl # required for knot >= 3.1
# without sphinx &al. for developer documentation
# TODO: add dnstap support?
]
++ optionals stdenv.isLinux [
libcap_ng systemd
libbpf # XDP support
]
++ optional stdenv.isDarwin zlib; # perhaps due to gnutls
] ++ lib.optionals stdenv.isLinux [
libcap_ng systemd
libbpf # XDP support
] ++ lib.optional stdenv.isDarwin zlib; # perhaps due to gnutls
enableParallelBuilding = true;

View file

@ -1,12 +1,11 @@
{lib, stdenv, fetchurl, tlsSupport ? true, openssl ? null}:
{ lib, stdenv, fetchurl, tlsSupport ? true, openssl }:
assert tlsSupport -> openssl != null;
stdenv.mkDerivation {
name = "ssmtp-2.64";
stdenv.mkDerivation rec {
pname = "ssmtp";
version = "2.64";
src = fetchurl {
url = "mirror://debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2";
url = "mirror://debian/pool/main/s/ssmtp/ssmtp_${version}.orig.tar.bz2";
sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
};
@ -19,16 +18,15 @@ stdenv.mkDerivation {
(lib.enableFeature tlsSupport "ssl")
];
postConfigure =
''
# Don't run the script that interactively generates a config file.
# Also don't install the broken, cyclic symlink /lib/sendmail.
sed -e '/INSTALLED_CONFIGURATION_FILE/d' \
-e 's|/lib/sendmail|$(TMPDIR)/sendmail|' \
-i Makefile
substituteInPlace Makefile \
--replace '$(INSTALL) -s' '$(INSTALL) -s --strip-program $(STRIP)'
'';
postConfigure = ''
# Don't run the script that interactively generates a config file.
# Also don't install the broken, cyclic symlink /lib/sendmail.
sed -e '/INSTALLED_CONFIGURATION_FILE/d' \
-e 's|/lib/sendmail|$(TMPDIR)/sendmail|' \
-i Makefile
substituteInPlace Makefile \
--replace '$(INSTALL) -s' '$(INSTALL) -s --strip-program $(STRIP)'
'';
installFlags = [ "etcdir=$(out)/etc" ];
@ -39,6 +37,7 @@ stdenv.mkDerivation {
NIX_LDFLAGS = lib.optionalString tlsSupport "-lcrypto";
meta = with lib; {
description = "simple MTA to deliver mail from a computer to a mail hub";
platforms = platforms.linux;
license = licenses.gpl2;
maintainers = with maintainers; [ basvandijk ];

View file

@ -1,33 +1,40 @@
{ lib, stdenv, fetchFromGitHub, cmake, nlohmann_json,
libtoxcore, libsodium, libcap, zeromq,
systemd ? null }:
with lib;
{ lib
, stdenv
, fetchFromGitHub
, cmake
, nlohmann_json
, libtoxcore
, libsodium
, libcap
, zeromq
, systemd
}:
stdenv.mkDerivation {
name = "toxvpn-2019-09-09";
name = "toxvpn";
version = "unstable-2019-09-09";
src = fetchFromGitHub {
owner = "cleverca22";
repo = "toxvpn";
rev = "45083dec172ce167f7ed84d571ec2822ebe4d51a";
owner = "cleverca22";
repo = "toxvpn";
rev = "45083dec172ce167f7ed84d571ec2822ebe4d51a";
sha256 = "193crarrx6q0zd2p6dn67pzv8kngwi440zm1y54njgcz0v3fpxmb";
};
buildInputs = [ libtoxcore nlohmann_json libsodium zeromq ]
++ optionals stdenv.isLinux [ libcap systemd ];
++ lib.optionals stdenv.isLinux [ libcap systemd ];
nativeBuildInputs = [ cmake ];
cmakeFlags = optional stdenv.isLinux [ "-DSYSTEMD=1" ];
cmakeFlags = lib.optional stdenv.isLinux [ "-DSYSTEMD=1" ];
postInstall = "$out/bin/toxvpn -h";
meta = with lib; {
description = "A powerful tool that allows one to make tunneled point to point connections over Tox";
homepage = "https://github.com/cleverca22/toxvpn";
license = licenses.gpl3;
homepage = "https://github.com/cleverca22/toxvpn";
license = licenses.gpl3;
maintainers = with maintainers; [ cleverca22 obadz toonn ];
platforms = platforms.linux ++ platforms.darwin;
platforms = platforms.unix;
};
}

View file

@ -28781,6 +28781,9 @@ in
pivx = libsForQt5.callPackage ../applications/blockchains/pivx { withGui = true; };
pivxd = callPackage ../applications/blockchains/pivx {
withGui = false;
qtbase = null;
qttools = null;
wrapQtAppsHook = null;
autoreconfHook = buildPackages.autoreconfHook269;
};