2016-11-19 13:07:57 +00:00
|
|
|
{ stdenv, fetchurl, dpkg }:
|
2014-12-25 22:16:20 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "xidel-${version}";
|
2018-02-28 03:09:22 +00:00
|
|
|
version = "0.9.6";
|
2014-12-25 22:16:20 +00:00
|
|
|
|
|
|
|
## Source archive lacks file (manageUtils.sh), using pre-built package for now.
|
|
|
|
#src = fetchurl {
|
|
|
|
# url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/${name}.src.tar.gz";
|
|
|
|
# sha256 = "1h5xn16lgzx0s94iyhxa50lk05yf0af44nzm5w5k57615nd82kz2";
|
|
|
|
#};
|
|
|
|
|
|
|
|
src =
|
2018-08-20 19:11:29 +00:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2014-12-25 22:16:20 +00:00
|
|
|
fetchurl {
|
|
|
|
url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_amd64.deb";
|
2018-02-28 03:09:22 +00:00
|
|
|
sha256 = "0hskc74y7p4j1x33yx0w4fvr610p2yimas8pxhr6bs7mb9b300h7";
|
2014-12-25 22:16:20 +00:00
|
|
|
}
|
2018-08-20 19:11:29 +00:00
|
|
|
else if stdenv.hostPlatform.system == "i686-linux" then
|
2014-12-25 22:16:20 +00:00
|
|
|
fetchurl {
|
|
|
|
url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_i386.deb";
|
|
|
|
sha256 = "07yk5sk1p4jm0jmgjwdm2wq8d2wybi1wkn1qq5j5y03z1pdc3fi6";
|
|
|
|
}
|
2018-08-20 19:11:29 +00:00
|
|
|
else throw "xidel is not supported on ${stdenv.hostPlatform.system}";
|
2014-12-25 22:16:20 +00:00
|
|
|
|
2016-11-19 13:07:57 +00:00
|
|
|
buildInputs = [ dpkg ];
|
2014-12-25 22:16:20 +00:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
dpkg-deb -x ${src} ./
|
|
|
|
'';
|
|
|
|
|
2016-05-04 10:08:35 +00:00
|
|
|
dontBuild = true;
|
2014-12-25 22:16:20 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp -a usr/* "$out/"
|
2016-11-19 13:07:57 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/bin/xidel"
|
2014-12-25 22:16:20 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Command line tool to download and extract data from html/xml pages";
|
|
|
|
homepage = http://videlibri.sourceforge.net/xidel.html;
|
|
|
|
# source contains no license info (AFAICS), but sourceforge says GPLv2
|
|
|
|
license = licenses.gpl2;
|
|
|
|
# more platforms will be supported when we switch to source build
|
2016-11-19 13:07:57 +00:00
|
|
|
platforms = platforms.linux;
|
2014-12-25 22:16:20 +00:00
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|