tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
sundtek init at 30-06-2015
Simon Vandel Sillesen
10 years ago
e85dac13
41cf8be4
+84
4 changed files
expand all
collapse all
unified
split
nixos
modules
module-list.nix
services
misc
sundtek.nix
pkgs
misc
drivers
sundtek
default.nix
top-level
all-packages.nix
+1
nixos/modules/module-list.nix
···
219
219
./services/misc/rogue.nix
220
220
./services/misc/siproxd.nix
221
221
./services/misc/subsonic.nix
222
222
+
./services/misc/sundtek.nix
222
223
./services/misc/svnserve.nix
223
224
./services/misc/synergy.nix
224
225
./services/misc/uhub.nix
+33
nixos/modules/services/misc/sundtek.nix
···
1
1
+
{ config, lib, pkgs, ... }:
2
2
+
3
3
+
with lib;
4
4
+
5
5
+
let
6
6
+
cfg = config.services.sundtek;
7
7
+
8
8
+
in
9
9
+
{
10
10
+
options.services.sundtek = {
11
11
+
enable = mkEnableOption "Sundtek driver";
12
12
+
};
13
13
+
14
14
+
config = mkIf cfg.enable {
15
15
+
16
16
+
environment.systemPackages = [ pkgs.sundtek ];
17
17
+
18
18
+
systemd.services.sundtek = {
19
19
+
description = "Sundtek driver";
20
20
+
wantedBy = [ "multi-user.target" ];
21
21
+
22
22
+
serviceConfig = {
23
23
+
Type = "oneshot";
24
24
+
ExecStart = ''
25
25
+
${pkgs.sundtek}/bin/mediasrv -d -v -p ${pkgs.sundtek}/bin ;\
26
26
+
${pkgs.sundtek}/bin/mediaclient --start=5 --wait-for-devices
27
27
+
'';
28
28
+
ExecStop = "${pkgs.sundtek}/bin/mediaclient --shutdown";
29
29
+
RemainAfterExit = true;
30
30
+
};
31
31
+
};
32
32
+
};
33
33
+
}
+48
pkgs/misc/drivers/sundtek/default.nix
···
1
1
+
{ fetchurl, stdenv }:
2
2
+
3
3
+
with stdenv.lib;
4
4
+
5
5
+
let
6
6
+
version = "30-06-2015";
7
7
+
rpath = makeLibraryPath [ "$out/lib" "$out/bin" ];
8
8
+
platform = with stdenv;
9
9
+
if isx86_64 then "64bit"
10
10
+
else
11
11
+
if isi686 then "32bit"
12
12
+
else abort "${system} not considered in build derivation. Might still be supported.";
13
13
+
14
14
+
in
15
15
+
stdenv.mkDerivation {
16
16
+
src = fetchurl {
17
17
+
url = "http://www.sundtek.de/media/netinst/${platform}/installer.tar.gz";
18
18
+
sha256 = "304d2785b5e9046c78fc092341721fdc404074105e63dd635e838559d42313c3";
19
19
+
};
20
20
+
name = "sundtek-${version}";
21
21
+
22
22
+
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
23
23
+
24
24
+
sourceRoot = ".";
25
25
+
26
26
+
installPhase = ''
27
27
+
cp -r opt $out
28
28
+
29
29
+
# add and fix pkg-config file
30
30
+
mkdir -p $out/lib/pkgconfig
31
31
+
substitute $out/doc/libmedia.pc $out/lib/pkgconfig/libmedia.pc \
32
32
+
--replace /opt $out
33
33
+
'';
34
34
+
35
35
+
postFixup = ''
36
36
+
find $out -type f -exec \
37
37
+
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \
38
38
+
patchelf --set-rpath ${rpath} {} \;
39
39
+
'';
40
40
+
41
41
+
meta = {
42
42
+
description = "Sundtek MediaTV driver";
43
43
+
maintainers = [ maintainers.simonvandel ];
44
44
+
platforms = platforms.unix;
45
45
+
license = licenses.unfree;
46
46
+
homepage = "http://support.sundtek.com/index.php/topic,1573.0.html";
47
47
+
};
48
48
+
}
+2
pkgs/top-level/all-packages.nix
···
2978
2978
2979
2979
suidChroot = callPackage ../tools/system/suid-chroot { };
2980
2980
2981
2981
+
sundtek = callPackage ../misc/drivers/sundtek { };
2982
2982
+
2981
2983
super = callPackage ../tools/security/super { };
2982
2984
2983
2985
ssdeep = callPackage ../tools/security/ssdeep { };