diff --git a/pkgs/tools/networking/fdm/default.nix b/pkgs/tools/networking/fdm/default.nix index a6700284af5..7a9e3fc0d1d 100644 --- a/pkgs/tools/networking/fdm/default.nix +++ b/pkgs/tools/networking/fdm/default.nix @@ -1,54 +1,45 @@ -x@{builderDefsPackage +{ stdenv, fetchurl , openssl, tdb, zlib, flex, bison - , ...}: -builderDefsPackage -(a : + }: let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; - - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + buildInputs = [ openssl tdb zlib flex bison ]; sourceInfo = rec { baseName="fdm"; - version="1.7"; + version = "1.7"; name="${baseName}-${version}"; url="mirror://sourceforge/${baseName}/${baseName}/${name}.tar.gz"; - hash="0apg1jasn4m5j3vh0v9lr2l3lyzy35av1ylxr0wf8k0j9w4p8i28"; + sha256 = "0apg1jasn4m5j3vh0v9lr2l3lyzy35av1ylxr0wf8k0j9w4p8i28"; }; in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation { + src = fetchurl { + inherit (sourceInfo) url sha256; }; inherit (sourceInfo) name version; inherit buildInputs; - phaseNames = ["doConfigure" "fixInstall" "doMakeInstall"]; - makeFlags = ["PREFIX=$out"]; - fixInstall = a.fullDepEntry ('' + preBuild = '' + export makeFlags="$makeFlags PREFIX=$out" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Dbool=int" + sed -i */Makefile -i Makefile -e 's@ -g bin @ @' sed -i */Makefile -i Makefile -e 's@ -o root @ @' sed -i GNUmakefile -e 's@ -g $(BIN_OWNER) @ @' sed -i GNUmakefile -e 's@ -o $(BIN_GROUP) @ @' sed -i */Makefile -i Makefile -i GNUmakefile -e 's@-I-@@g' - '') ["minInit" "doUnpack"]; + ''; meta = { description = "Mail fetching and delivery tool - should do the job of getmail and procmail"; - maintainers = with a.lib.maintainers; + maintainers = with stdenv.lib.maintainers; [ raskin ]; - platforms = with a.lib.platforms; + platforms = with stdenv.lib.platforms; linux; + homepage = "http://fdm.sourceforge.net/"; + inherit (sourceInfo) version; + updateWalker = true; }; - passthru = { - updateInfo = { - downloadPage = "http://fdm.sourceforge.net/"; - }; - }; -}) x - +}