Merge pull request #12701 from mayflower/builder-def-cleanup
builderDefsPackage cleanup
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
a @ { zlib, libpng, freetype, gd, which, libxml2, geoip, ... } :
|
||||
let
|
||||
s = import ./src-for-default.nix;
|
||||
buildInputs = with a; [
|
||||
zlib libpng freetype gd which libxml2
|
||||
geoip
|
||||
];
|
||||
in
|
||||
rec {
|
||||
src = a.fetchUrlFromSrcInfo s;
|
||||
|
||||
inherit (s) name;
|
||||
inherit buildInputs;
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = ["doConfigure" "doMakeInstall" "doLinks"];
|
||||
|
||||
doLinks = a.fullDepEntry (''
|
||||
ln -s shared_en.xsl $out/share/webdruid/classic/shared.xsl
|
||||
'') ["minInit"];
|
||||
|
||||
meta = {
|
||||
description = "A web log analyzer";
|
||||
maintainers = [
|
||||
a.lib.maintainers.raskin
|
||||
];
|
||||
platforms = a.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
rec {
|
||||
advertisedUrl="http://downloads.sourceforge.net/webdruid/files/webdruid/0.6.0-alpha5/webdruid-0.6.0-alpha5.tar.gz";
|
||||
version = "0.6.0-alpha5";
|
||||
url="mirror://sourceforge/webdruid/webdruid-${version}.tar.gz";
|
||||
hash = "1aiqffccayvf02snl9la62zqb1674cp4rv19af6xyxgvw4334hw0";
|
||||
name = "webdruid-0.6.0-alpha5";
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
downloadPage = "http://sourceforge.net/projects/webdruid/files/";
|
||||
choiceCommand = ''head -1 | sed -re "$skipRedirectSF"'';
|
||||
versionExtractorSedScript = ''$extractReleaseSF'';
|
||||
versionReferenceCreator = ''s@$version@\''${version}@g'';
|
||||
baseName = "webdruid";
|
||||
}
|
||||
@@ -1,42 +1,19 @@
|
||||
a @ { cmake, patchelf, imagemagick, ... } :
|
||||
let
|
||||
fetchurl = a.fetchurl;
|
||||
{ stdenv, fetchurl, cmake, patchelf, imagemagick }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cuneiform-${version}";
|
||||
version = "1.1.0";
|
||||
buildInputs = with a; [
|
||||
cmake imagemagick patchelf
|
||||
];
|
||||
in
|
||||
rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/cuneiform-linux/1.1/1.1/+download/cuneiform-linux-1.1.0.tar.bz2";
|
||||
sha256 = "1bdvppyfx2184zmzcylskd87cxv56d8f32jf7g1qc8779l2hszjp";
|
||||
};
|
||||
|
||||
inherit buildInputs;
|
||||
configureFlags = [];
|
||||
buildInputs = [
|
||||
cmake imagemagick
|
||||
];
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = ["doCmake" "doMakeInstall" "postInstall"];
|
||||
|
||||
libc = if a.stdenv ? glibc then a.stdenv.glibc else "";
|
||||
|
||||
doCmake = a.fullDepEntry(''
|
||||
mkdir -p $PWD/builddir
|
||||
cd builddir
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -ldl -L$out/lib"
|
||||
cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=$out -DDL_LIB=${libc}/lib
|
||||
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
||||
|
||||
needLib64 = a.stdenv.system == "x86_64-linux";
|
||||
|
||||
postInstall = a.fullDepEntry(''
|
||||
patchelf --set-rpath $out/lib${if needLib64 then "64" else ""}${if a.stdenv.cc.cc != null then ":${a.stdenv.cc.cc}/lib" else ""}${if a.stdenv.cc.cc != null && needLib64 then ":${a.stdenv.cc.cc}/lib64" else ""}:${a.imagemagick}/lib $out/bin/cuneiform
|
||||
'') ["minInit" "addInputs" "doMakeInstall"];
|
||||
|
||||
name = "cuneiform-" + version;
|
||||
meta = {
|
||||
inherit version;
|
||||
description = "Multi-language OCR system";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,57 +1,35 @@
|
||||
x@{builderDefsPackage
|
||||
, jre
|
||||
, ...}:
|
||||
builderDefsPackage
|
||||
(a :
|
||||
let
|
||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
||||
["jre"];
|
||||
{ stdenv, fetchsvn, jre, makeWrapper }:
|
||||
|
||||
buildInputs = map (n: builtins.getAttr n x)
|
||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
||||
sourceInfo = rec {
|
||||
baseName="welkin";
|
||||
version="1.1";
|
||||
name="${baseName}-${version}";
|
||||
url="http://simile.mit.edu/dist/welkin/${name}.tar.gz";
|
||||
hash="0hr2xvfz887fdf2ysiqydv6m13gbdl5x0fh4960i655d5imvd5x0";
|
||||
};
|
||||
in
|
||||
rec {
|
||||
src = a.fetchurl {
|
||||
url = sourceInfo.url;
|
||||
sha256 = sourceInfo.hash;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "welkin-${version}";
|
||||
version = "1.1";
|
||||
|
||||
src = fetchsvn {
|
||||
url = "http://simile.mit.edu/repository/welkin";
|
||||
rev = "9638";
|
||||
sha256 = "1bqh3vam7y805xrmdw7k0ckcfwjg88wypxgv3njkkwyn7kxnfnqp";
|
||||
};
|
||||
|
||||
inherit (sourceInfo) name version;
|
||||
inherit buildInputs;
|
||||
sourceRoot = "welkin-r9638/tags/${version}";
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = ["doDeploy" "createBin"];
|
||||
buildInputs = [ jre makeWrapper ];
|
||||
|
||||
doDeploy = a.simplyShare "welkin";
|
||||
|
||||
createBin = a.fullDepEntry ''
|
||||
mkdir -p "$out/bin"
|
||||
echo "#! ${a.stdenv.shell}" > "$out/bin/welkin"
|
||||
echo "export JAVA_HOME=${jre}" >> "$out/bin/welkin"
|
||||
echo "\"$out/share/welkin/welkin.sh\" \"\$@\"" >> "$out/bin/welkin"
|
||||
sed -e 's@[.]/lib/welkin[.]jar@"'"$out"'/share/welkin/lib/welkin.jar"@' -i "$out/share/welkin/welkin.sh"
|
||||
chmod a+x "$out/bin/welkin"
|
||||
'' ["minInit" "defEnsureDir"];
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,share}
|
||||
cp -R . $out/share
|
||||
cp $out/share/welkin.sh $out/bin/welkin
|
||||
sed -e 's@\./lib/welkin\.jar@'"$out"'/share/lib/welkin.jar@' -i $out/bin/welkin
|
||||
wrapProgram $out/bin/welkin \
|
||||
--set JAVA_HOME ${jre}
|
||||
chmod a+x $out/bin/welkin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "An RDF visualizer";
|
||||
maintainers = with a.lib.maintainers;
|
||||
[
|
||||
maintainers = with stdenv.lib.maintainers; [
|
||||
raskin
|
||||
];
|
||||
hydraPlatforms = [];
|
||||
license = a.lib.licenses.free;
|
||||
license = stdenv.lib.licenses.free;
|
||||
};
|
||||
passthru = {
|
||||
updateInfo = {
|
||||
downloadPage = "http://simile.mit.edu/dist/welkin/";
|
||||
};
|
||||
};
|
||||
}) x
|
||||
}
|
||||
|
||||
@@ -1,31 +1,25 @@
|
||||
a @ { intltool, perl, gettext, libusb, pkgconfig, bluez, readline, pcsclite, libical, gtk, glib, libXpm, ... } :
|
||||
let
|
||||
fetchurl = a.fetchurl;
|
||||
{ stdenv, fetchurl, intltool, perl, gettext, libusb, pkgconfig, bluez
|
||||
, readline, pcsclite, libical, gtk, glib, libXpm }:
|
||||
|
||||
s = import ./src-for-default.nix;
|
||||
buildInputs = with a; [
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gnokii-${version}";
|
||||
version = "0.6.31";
|
||||
|
||||
src = fetchurl {
|
||||
sha256 = "0sjjhm40662bj6j0jh3sd25b8nww54nirpwamz618rg6pb5hjwm8";
|
||||
url = "http://www.gnokii.org/download/gnokii/${name}.tar.gz";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
perl intltool gettext libusb
|
||||
glib gtk pkgconfig bluez readline
|
||||
libXpm pcsclite libical
|
||||
];
|
||||
in
|
||||
|
||||
assert a.stdenv ? glibc;
|
||||
|
||||
rec {
|
||||
src = a.fetchUrlFromSrcInfo s;
|
||||
|
||||
inherit buildInputs;
|
||||
configureFlags = [];
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = [ "doConfigure" "doMakeInstall"];
|
||||
|
||||
inherit(s) name;
|
||||
meta = {
|
||||
description = "Cellphone tool";
|
||||
homepage = http://www.gnokii.org;
|
||||
maintainers = [a.lib.maintainers.raskin];
|
||||
platforms = with a.lib.platforms; linux;
|
||||
maintainers = [ stdenv.lib.maintainers.raskin ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
rec {
|
||||
version="0.6.31";
|
||||
name="gnokii-0.6.31";
|
||||
hash="0sjjhm40662bj6j0jh3sd25b8nww54nirpwamz618rg6pb5hjwm8";
|
||||
url="http://www.gnokii.org/download/gnokii/gnokii-${version}.tar.gz";
|
||||
advertisedUrl="http://www.gnokii.org/download/gnokii/gnokii-0.6.31.tar.gz";
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
downloadPage = "http://www.gnokii.org/download/gnokii/?C=M;O=D";
|
||||
baseName = "gnokii";
|
||||
}
|
||||
@@ -1,50 +1,28 @@
|
||||
x@{builderDefsPackage
|
||||
|
||||
, ...}:
|
||||
builderDefsPackage
|
||||
(a :
|
||||
let
|
||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
||||
[];
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
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;
|
||||
stdenv.mkDerivation rec {
|
||||
baseName = "altermime";
|
||||
name = "${baseName}-${version}";
|
||||
version = "0.3.10";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.pldaniels.com/${baseName}/${name}.tar.gz";
|
||||
sha256 = "0vn3vmbcimv0n14khxr1782m76983zz9sf4j2kz5v86lammxld43";
|
||||
};
|
||||
|
||||
inherit (sourceInfo) name version;
|
||||
inherit buildInputs;
|
||||
patches = map fetchurl (import ./debian-patches.nix);
|
||||
|
||||
patches = map a.fetchurl (import ./debian-patches.nix);
|
||||
|
||||
phaseNames = ["doPatch" "fixTarget" "doMakeInstall"];
|
||||
fixTarget = a.fullDepEntry (''
|
||||
postPatch = ''
|
||||
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;
|
||||
[
|
||||
maintainers = with stdenv.lib.maintainers; [
|
||||
raskin
|
||||
];
|
||||
platforms = with a.lib.platforms;
|
||||
linux;
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
downloadPage = "http://www.pldaniels.com/altermime/";
|
||||
inherit version;
|
||||
updateWalker = true;
|
||||
};
|
||||
}) x
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user