1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00
nixpkgs/pkgs/tools/networking/altermime/default.nix
Yury G. Kudryashov 68b6d23a35 Fix altermime build
svn path=/nixpkgs/trunk/; revision=33625
2012-04-05 15:31:10 +00:00

53 lines
1.2 KiB
Nix

x@{builderDefsPackage
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x)
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec {
baseName="altermime";
version="0.3.10";
name="${baseName}-${version}";
url="http://www.pldaniels.com/${baseName}/${name}.tar.gz";
hash="0vn3vmbcimv0n14khxr1782m76983zz9sf4j2kz5v86lammxld43";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
};
inherit (sourceInfo) name version;
inherit buildInputs;
patches = map a.fetchurl (import ./debian-patches.nix);
phaseNames = ["doPatch" "fixTarget" "doMakeInstall"];
fixTarget = a.fullDepEntry (''
sed -i Makefile -e "s@/usr/local@$out@"
mkdir -p "$out/bin"
'') ["doUnpack" "minInit" "defEnsureDir"];
meta = {
description = "MIME alteration tool";
maintainers = with a.lib.maintainers;
[
raskin
];
platforms = with a.lib.platforms;
linux;
};
passthru = {
updateInfo = {
downloadPage = "http://www.pldaniels.com/altermime/";
};
};
}) x