forked from mirrors/nixpkgs
Starting migrating old builderDefs packages to builderDefsPackage style.
svn path=/nixpkgs/trunk/; revision=13591
This commit is contained in:
parent
2b2bb11f32
commit
d49a6f0641
|
@ -1,32 +1,38 @@
|
||||||
args : with args; with builderDefs;
|
args :
|
||||||
let localDefs = builderDefs.passthru.function (rec {
|
let
|
||||||
src = /* put a fetchurl here */
|
lib = args.lib;
|
||||||
fetchurl {
|
fetchurl = args.fetchurl;
|
||||||
url = http://prdownloads.sourceforge.net/sourceforge/bmrsa/bmrsa11.zip;
|
FullDepEntry = args.FullDepEntry;
|
||||||
sha256 = "0ksd9xkvm9lkvj4yl5sl0zmydp1wn3xhc55b28gj70gi4k75kcl4";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [unzip];
|
version = lib.getAttr ["version"] "" args;
|
||||||
configureFlags = [];
|
buildInputs = with args; [
|
||||||
doUnpack = FullDepEntry (''
|
unzip
|
||||||
mkdir bmrsa
|
];
|
||||||
cd bmrsa
|
in
|
||||||
unzip ${src}
|
rec {
|
||||||
sed -e 's/gcc/g++/' -i Makefile
|
src = fetchurl {
|
||||||
ensureDir $out/bin
|
url = "http://prdownloads.sourceforge.net/sourceforge/bmrsa/bmrsa${version}.zip";
|
||||||
echo -e 'install:\n\tcp bmrsa '$out'/bin' >> Makefile
|
sha256 = "0ksd9xkvm9lkvj4yl5sl0zmydp1wn3xhc55b28gj70gi4k75kcl4";
|
||||||
'') ["minInit" "addInputs" "defEnsureDir"];
|
};
|
||||||
});
|
|
||||||
in with localDefs;
|
inherit buildInputs;
|
||||||
stdenv.mkDerivation rec {
|
configureFlags = [];
|
||||||
name = "bmrsa-"+version;
|
|
||||||
builder = writeScript (name + "-builder")
|
/* doConfigure should be specified separately */
|
||||||
(textClosure localDefs
|
phaseNames = ["doMakeInstall"];
|
||||||
[doMakeInstall doForceShare doPropagate]);
|
|
||||||
meta = {
|
doUnpack = FullDepEntry (''
|
||||||
description = "
|
mkdir bmrsa
|
||||||
RSA utility.
|
cd bmrsa
|
||||||
";
|
unzip ${src}
|
||||||
inherit src;
|
sed -e 's/gcc/g++/' -i Makefile
|
||||||
};
|
ensureDir $out/bin
|
||||||
|
echo -e 'install:\n\tcp bmrsa '$out'/bin' >> Makefile
|
||||||
|
'') ["minInit" "addInputs" "defEnsureDir"];
|
||||||
|
|
||||||
|
name = "bmrsa-"+version;
|
||||||
|
meta = {
|
||||||
|
description = "RSA utility";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -556,8 +556,8 @@ let
|
||||||
inherit fetchurl stdenv python wxPython26;
|
inherit fetchurl stdenv python wxPython26;
|
||||||
};
|
};
|
||||||
|
|
||||||
bmrsa = composedArgsAndFun (selectVersion ../tools/security/bmrsa "11") {
|
bmrsa = builderDefsPackage (selectVersion ../tools/security/bmrsa "11") {
|
||||||
inherit builderDefs unzip;
|
inherit unzip;
|
||||||
};
|
};
|
||||||
|
|
||||||
bogofilter = import ../tools/misc/bogofilter {
|
bogofilter = import ../tools/misc/bogofilter {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
args :
|
a :
|
||||||
let
|
let
|
||||||
lib = args.lib;
|
lib = a.lib;
|
||||||
fetchurl = args.fetchurl;
|
fetchurl = a.fetchurl;
|
||||||
|
|
||||||
version = lib.getAttr ["version"] "" args;
|
version = lib.getAttr ["version"] "" a;
|
||||||
buildInputs = with args; [
|
buildInputs = with a; [
|
||||||
|
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
|
@ -14,8 +14,8 @@ rec {
|
||||||
inherit buildInputs;
|
inherit buildInputs;
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
|
|
||||||
/* doConfigure should be specified separately */
|
/* doConfigure should be removed if not needed */
|
||||||
phaseNames = ["doMakeInstall"];
|
phaseNames = ["doConfigure" "doMakeInstall"];
|
||||||
|
|
||||||
name = "${abort "Specify name"}-" + version;
|
name = "${abort "Specify name"}-" + version;
|
||||||
meta = {
|
meta = {
|
||||||
|
|
Loading…
Reference in a new issue