2021-01-15 13:21:58 +00:00
|
|
|
{ fetchurl, lib, stdenv }:
|
2015-07-02 01:18:56 +00:00
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
with lib;
|
2015-07-02 01:18:56 +00:00
|
|
|
|
|
|
|
let
|
2016-01-30 19:08:52 +00:00
|
|
|
version = "2016-01-26";
|
2015-07-02 01:18:56 +00:00
|
|
|
rpath = makeLibraryPath [ "$out/lib" "$out/bin" ];
|
|
|
|
platform = with stdenv;
|
|
|
|
if isx86_64 then "64bit"
|
|
|
|
else
|
|
|
|
if isi686 then "32bit"
|
2017-12-05 23:06:43 +00:00
|
|
|
else throw "${system} not considered in build derivation. Might still be supported.";
|
2015-07-02 01:18:56 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.sundtek.de/media/netinst/${platform}/installer.tar.gz";
|
2016-01-30 19:08:52 +00:00
|
|
|
sha256 = "15y6r5w306pcq4g1rn9f7vf70f3a7qhq237ngaf0wxh2nr0aamxp";
|
2015-07-02 01:18:56 +00:00
|
|
|
};
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "sundtek";
|
|
|
|
inherit version;
|
2015-07-02 01:18:56 +00:00
|
|
|
|
|
|
|
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cp -r opt $out
|
|
|
|
|
|
|
|
# add and fix pkg-config file
|
|
|
|
mkdir -p $out/lib/pkgconfig
|
|
|
|
substitute $out/doc/libmedia.pc $out/lib/pkgconfig/libmedia.pc \
|
|
|
|
--replace /opt $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
find $out -type f -exec \
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \
|
|
|
|
patchelf --set-rpath ${rpath} {} \;
|
|
|
|
'';
|
|
|
|
|
2016-01-30 19:08:52 +00:00
|
|
|
preferLocalBuild = true;
|
|
|
|
|
2015-07-02 01:18:56 +00:00
|
|
|
meta = {
|
|
|
|
description = "Sundtek MediaTV driver";
|
|
|
|
maintainers = [ maintainers.simonvandel ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.unfree;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://support.sundtek.com/index.php/topic,1573.0.html";
|
2015-07-02 01:18:56 +00:00
|
|
|
};
|
|
|
|
}
|