2016-11-19 14:07:57 +01:00
|
|
|
{ stdenv, fetchurl, dpkg }:
|
2014-12-25 23:16:20 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "xidel";
|
2018-02-28 04:09:22 +01:00
|
|
|
version = "0.9.6";
|
2014-12-25 23:16:20 +01: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 21:11:29 +02:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2014-12-25 23:16:20 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_amd64.deb";
|
2018-02-28 04:09:22 +01:00
|
|
|
sha256 = "0hskc74y7p4j1x33yx0w4fvr610p2yimas8pxhr6bs7mb9b300h7";
|
2014-12-25 23:16:20 +01:00
|
|
|
}
|
2018-08-20 21:11:29 +02:00
|
|
|
else if stdenv.hostPlatform.system == "i686-linux" then
|
2014-12-25 23:16:20 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_i386.deb";
|
|
|
|
sha256 = "07yk5sk1p4jm0jmgjwdm2wq8d2wybi1wkn1qq5j5y03z1pdc3fi6";
|
|
|
|
}
|
2018-08-20 21:11:29 +02:00
|
|
|
else throw "xidel is not supported on ${stdenv.hostPlatform.system}";
|
2014-12-25 23:16:20 +01:00
|
|
|
|
2016-11-19 14:07:57 +01:00
|
|
|
buildInputs = [ dpkg ];
|
2014-12-25 23:16:20 +01:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
dpkg-deb -x ${src} ./
|
|
|
|
'';
|
|
|
|
|
2016-05-04 12:08:35 +02:00
|
|
|
dontBuild = true;
|
2014-12-25 23:16:20 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp -a usr/* "$out/"
|
2016-11-19 14:07:57 +01:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/bin/xidel"
|
2014-12-25 23:16:20 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Command line tool to download and extract data from html/xml pages";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://videlibri.sourceforge.net/xidel.html";
|
2014-12-25 23:16:20 +01:00
|
|
|
# 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 14:07:57 +01:00
|
|
|
platforms = platforms.linux;
|
2014-12-25 23:16:20 +01:00
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|