mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
Merge pull request #38033 from peterhoeg/f/slite
squeezelite: 2016-05-27 -> 2018-08-14
This commit is contained in:
commit
7776de07f4
@ -272,7 +272,7 @@
|
||||
nzbget = 245;
|
||||
mosquitto = 246;
|
||||
toxvpn = 247;
|
||||
squeezelite = 248;
|
||||
# squeezelite = 248; # DynamicUser = true
|
||||
turnserver = 249;
|
||||
smokeping = 250;
|
||||
gocd-agent = 251;
|
||||
|
@ -3,9 +3,7 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
uid = config.ids.uids.squeezelite;
|
||||
cfg = config.services.squeezelite;
|
||||
dataDir = "/var/lib/squeezelite";
|
||||
|
||||
in {
|
||||
|
||||
@ -17,14 +15,6 @@ in {
|
||||
|
||||
enable = mkEnableOption "Squeezelite, a software Squeezebox emulator";
|
||||
|
||||
dataDir = mkOption {
|
||||
default = "/var/lib/squeezelite";
|
||||
type = types.str;
|
||||
description = ''
|
||||
The directory where Squeezelite stores its name file.
|
||||
'';
|
||||
};
|
||||
|
||||
extraArguments = mkOption {
|
||||
default = "";
|
||||
type = types.str;
|
||||
@ -46,22 +36,14 @@ in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "sound.target" ];
|
||||
description = "Software Squeezebox emulator";
|
||||
preStart = "mkdir -p ${cfg.dataDir} && chown -R squeezelite ${cfg.dataDir}";
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.squeezelite}/bin/squeezelite -N ${cfg.dataDir}/player-name ${cfg.extraArguments}";
|
||||
User = "squeezelite";
|
||||
PermissionsStartOnly = true;
|
||||
DynamicUser = true;
|
||||
ExecStart = "${pkgs.squeezelite}/bin/squeezelite -N ${dataDir}/player-name ${cfg.extraArguments}";
|
||||
StateDirectory = builtins.baseNameOf dataDir;
|
||||
SupplementaryGroups = "audio";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.squeezelite= {
|
||||
inherit uid;
|
||||
group = "nogroup";
|
||||
extraGroups = [ "audio" ];
|
||||
description = "Squeezelite user";
|
||||
home = "${cfg.dataDir}";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,20 +1,26 @@
|
||||
{ stdenv, fetchFromGitHub, alsaLib, faad2, flac, libmad, libvorbis, mpg123 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "squeezelite-git-2016-05-27";
|
||||
name = "squeezelite-git-2018-08-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ralph-irving";
|
||||
repo = "squeezelite";
|
||||
rev = "e37ed17fed9e11a7346cbe9f1e1deeccc051f42e";
|
||||
sha256 = "15ihx2dbp4kr6k6r50g9q5npqad5zyv8nqf5cr37bhg964syvbdm";
|
||||
owner = "ralph-irving";
|
||||
repo = "squeezelite";
|
||||
rev = "ecb6e3696a42113994640e5345d0b5ca2e77d28b";
|
||||
sha256 = "0di3d5qy8fhawijq6bxy524fgffvzl08dprrws0fs2j1a70fs0fh";
|
||||
};
|
||||
|
||||
buildInputs = [ alsaLib faad2 flac libmad libvorbis mpg123 ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp squeezelite $out/bin
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 -t $out/bin squeezelite
|
||||
install -Dm644 -t $out/share/doc/squeezelite *.txt *.md
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user