mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
jackett: init at 0.7.1197 + nixos module
This commit is contained in:
parent
958668ab80
commit
2db5c5cfe2
|
@ -275,6 +275,7 @@
|
|||
./services/misc/gpsd.nix
|
||||
#./services/misc/ihaskell.nix
|
||||
./services/misc/irkerd.nix
|
||||
./services/misc/jackett.nix
|
||||
./services/misc/leaps.nix
|
||||
./services/misc/mantisbt.nix
|
||||
./services/misc/mathics.nix
|
||||
|
|
44
nixos/modules/services/misc/jackett.nix
Normal file
44
nixos/modules/services/misc/jackett.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, pkgs, lib, mono, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.jackett;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.jackett = {
|
||||
enable = mkEnableOption "Jackett";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.jackett = {
|
||||
description = "Jackett";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
preStart = ''
|
||||
test -d /var/lib/jackett/ || {
|
||||
echo "Creating jackett data directory in /var/lib/jackett/"
|
||||
mkdir -p /var/lib/jackett/
|
||||
}
|
||||
chown -R jackett /var/lib/jackett/
|
||||
chmod 0700 /var/lib/jackett/
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "jackett";
|
||||
Group = "nogroup";
|
||||
PermissionsStartOnly = "true";
|
||||
ExecStart = "${pkgs.jackett}/bin/Jackett";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
users.extraUsers.jackett = {
|
||||
home = "/var/lib/jackett";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
30
pkgs/servers/jackett/default.nix
Normal file
30
pkgs/servers/jackett/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ stdenv, fetchurl, mono, curl, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "jackett-${version}";
|
||||
version = "0.7.1197";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.Mono.tar.gz";
|
||||
sha256 = "0p9xdfbb8pda5a3knnw6145jky3bf10y1dj2clgsbbygi2xnam2v";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,share/${name}}
|
||||
cp -r * $out/share/${name}
|
||||
|
||||
makeWrapper "${mono}/bin/mono" $out/bin/Jackett \
|
||||
--add-flags "$out/share/${name}/JackettConsole.exe" \
|
||||
--prefix LD_LIBRARY_PATH ':' "${curl.out}/lib"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "API Support for your favorite torrent trackers.";
|
||||
homepage = https://github.com/Jackett/Jackett/;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
|
@ -2436,6 +2436,8 @@ with pkgs;
|
|||
|
||||
jaaa = callPackage ../applications/audio/jaaa { };
|
||||
|
||||
jackett = callPackage ../servers/jackett { };
|
||||
|
||||
jade = callPackage ../tools/text/sgml/jade { };
|
||||
|
||||
jd-gui = callPackage_i686 ../tools/security/jd-gui { };
|
||||
|
|
Loading…
Reference in a new issue