ripmime: reimplement using mkDerivation
This commit is contained in:
parent
b0e5edae35
commit
e532271089
@ -1,51 +1,29 @@
|
|||||||
x@{builderDefsPackage
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
, ...}:
|
stdenv.mkDerivation rec {
|
||||||
builderDefsPackage
|
name = "${pname}-${version}";
|
||||||
(a :
|
pname = "ripmime";
|
||||||
let
|
version = "1.4.0.10";
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
src = fetchurl {
|
||||||
[];
|
url = "http://www.pldaniels.com/${pname}/${name}.tar.gz";
|
||||||
|
sha256 = "0sj06ibmlzy34n8v0mnlq2gwidy7n2aqcwgjh0xssz3vi941aqc9";
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
||||||
sourceInfo = rec {
|
|
||||||
baseName="ripmime";
|
|
||||||
version="1.4.0.10";
|
|
||||||
name="${baseName}-${version}";
|
|
||||||
url="http://www.pldaniels.com/${baseName}/${name}.tar.gz";
|
|
||||||
hash="0sj06ibmlzy34n8v0mnlq2gwidy7n2aqcwgjh0xssz3vi941aqc9";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
src = a.fetchurl {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.hash;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
preInstall = ''
|
||||||
inherit buildInputs;
|
|
||||||
|
|
||||||
/* doConfigure should be removed if not needed */
|
|
||||||
phaseNames = ["fixTarget" "doMakeInstall"];
|
|
||||||
fixTarget = a.fullDepEntry (''
|
|
||||||
sed -i Makefile -e "s@LOCATION=.*@LOCATION=$out@" -e "s@man/man1@share/&@"
|
sed -i Makefile -e "s@LOCATION=.*@LOCATION=$out@" -e "s@man/man1@share/&@"
|
||||||
mkdir -p "$out/bin" "$out/share/man/man1"
|
mkdir -p "$out/bin" "$out/share/man/man1"
|
||||||
'') ["doUnpack" "minInit" "defEnsureDir"];
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Attachment extractor for MIME messages";
|
description = "Attachment extractor for MIME messages";
|
||||||
maintainers = with a.lib.maintainers;
|
maintainers = with maintainers; [ raskin ];
|
||||||
[
|
homepage = http://www.pldaniels.com/ripmime/;
|
||||||
raskin
|
platforms = with platforms; linux;
|
||||||
];
|
|
||||||
platforms = with a.lib.platforms;
|
|
||||||
linux;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateInfo = {
|
updateInfo = {
|
||||||
downloadPage = "http://www.pldaniels.com/ripmime/";
|
downloadPage = "http://www.pldaniels.com/ripmime/";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}) x
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user