ioping: reimplement using mkDerivation

Also
- set platform unix (upstream claims to support bsd and sun as well)
- fetch source from GitHub
This commit is contained in:
Joachim Fasting 2015-04-18 19:45:01 +02:00
parent a579886b2b
commit 290c217577

View File

@ -1,47 +1,20 @@
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="ioping";
version = "0.9";
name="${baseName}-${version}";
url="https://docs.google.com/uc?id=0B_PlDc2qaehFWWtLZ3Z3N1ltdm8&export=download";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
name = "${sourceInfo.name}.tar.gz";
stdenv.mkDerivation rec {
name = "ioping-${version}";
version = "0.9";
src = fetchurl {
url = "https://github.com/koct9i/ioping/releases/download/v${version}/${name}.tar.gz";
sha256 = "0pbp7b3304y9yyv2w41l3898h5q8w77hnnnq1vz8qz4qfl4467lm";
};
inherit (sourceInfo) name version;
inherit buildInputs;
makeFlags = "PREFIX=$(out)";
/* doConfigure should be removed if not needed */
phaseNames = ["doMakeInstall"];
makeFlags = [
''PREFIX="$out"''
];
meta = {
description = "Filesystem IO delay time measurer";
maintainers = with a.lib.maintainers;
[
raskin
];
platforms = with a.lib.platforms;
linux;
license = a.lib.licenses.gpl3Plus;
homepage = "http://code.google.com/p/ioping/";
inherit version;
meta = with stdenv.lib; {
description = "Disk I/O latency measuring tool";
maintainers = with maintainers; [ raskin ];
platforms = with platforms; unix;
license = licenses.gpl3Plus;
homepage = https://github.com/koct9i/ioping;
};
}) x
}