forked from NixOS/nixpkgs
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
296 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
let cfg = config.services.phylactery; | ||
in { | ||
options.services.phylactery = { | ||
enable = mkEnableOption "Whether to enable Phylactery server"; | ||
|
||
host = mkOption { | ||
type = types.str; | ||
default = "localhost"; | ||
description = "Listen host for Phylactery"; | ||
}; | ||
|
||
port = mkOption { | ||
type = types.port; | ||
description = "Listen port for Phylactery"; | ||
}; | ||
|
||
library = mkOption { | ||
type = types.path; | ||
description = "Path to CBZ library"; | ||
}; | ||
|
||
package = mkOption { | ||
type = types.package; | ||
default = pkgs.phylactery; | ||
defaultText = literalExpression "pkgs.phylactery"; | ||
description = "The Phylactery package to use"; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
systemd.services.phylactery = { | ||
environment = { | ||
PHYLACTERY_ADDRESS = "${cfg.host}:${toString cfg.port}"; | ||
PHYLACTERY_LIBRARY = "${cfg.library}"; | ||
}; | ||
|
||
wantedBy = [ "multi-user.target" ]; | ||
|
||
serviceConfig = { | ||
ConditionPathExists = cfg.library; | ||
DynamicUser = true; | ||
ExecStart = "${cfg.package}/bin/phylactery"; | ||
}; | ||
}; | ||
}; | ||
|
||
meta.maintainers = with maintainers; [ McSinyx ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import ../make-test-python.nix ({ pkgs, lib, ... }: { | ||
name = "phylactery"; | ||
|
||
nodes.machine = { ... }: { | ||
services.phylactery = rec { | ||
enable = true; | ||
port = 8080; | ||
library = "/tmp"; | ||
}; | ||
}; | ||
|
||
testScript = '' | ||
start_all() | ||
machine.wait_for_unit('phylactery') | ||
machine.wait_for_open_port(8080) | ||
machine.wait_until_succeeds('curl localhost:8080') | ||
''; | ||
|
||
meta.maintainers = with lib.maintainers; [ McSinyx ]; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,61 @@ | ||
{ fetchurl, lib, stdenv, jre, glib, libXtst, gtk2, makeWrapper, unzip }: | ||
{ stdenv | ||
, fetchurl | ||
, lib | ||
, makeWrapper | ||
, unzip | ||
, glib | ||
, gtk2 | ||
, gtk3 | ||
, jre | ||
, libXtst | ||
, zulu | ||
, preferGtk3 ? true | ||
, preferZulu ? true | ||
}: | ||
|
||
let | ||
rev = 3390; | ||
jre' = if preferZulu then zulu else jre; | ||
gtk' = if preferGtk3 then gtk3 else gtk2; | ||
|
||
inherit (lib) makeLibraryPath versions; | ||
|
||
in | ||
stdenv.mkDerivation rec { | ||
pname = "davmail"; | ||
version = "5.5.1"; | ||
version = "6.0.1"; | ||
|
||
src = fetchurl { | ||
url = "mirror://sourceforge/${pname}/${version}/${pname}-${version}-3299.zip"; | ||
sha256 = "sha256-NN/TUOcUIifNzrJnZmtYhs6UVktjlfoOYJjYaMEQpI4="; | ||
url = "mirror://sourceforge/${pname}/${version}/${pname}-${version}-${toString rev}.zip"; | ||
sha256 = "1i1z1kdglccg7pyidlfbagdhgs0wqvybl8dwxcpglh2hkvi0dba0"; | ||
}; | ||
|
||
postPatch = '' | ||
sed -i -e '/^JAVA_OPTS/d' davmail | ||
''; | ||
|
||
sourceRoot = "."; | ||
|
||
nativeBuildInputs = [ makeWrapper unzip ]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/share/davmail | ||
cp -vR ./* $out/share/davmail | ||
makeWrapper $out/share/davmail/davmail $out/bin/davmail \ | ||
--prefix PATH : ${jre}/bin \ | ||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ glib gtk2 libXtst ]} | ||
--set-default JAVA_OPTS "-Xmx512M -Dsun.net.inetaddr.ttl=60 -Djdk.gtk.version=${lib.versions.major gtk'.version}" \ | ||
--prefix PATH : ${jre'}/bin \ | ||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ glib gtk' libXtst ]} | ||
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { | ||
homepage = "http://davmail.sourceforge.net/"; | ||
description = "A Java application which presents a Microsoft Exchange server as local CALDAV, IMAP and SMTP servers"; | ||
maintainers = [ ]; | ||
platforms = platforms.all; | ||
homepage = "http://davmail.sourceforge.net/"; | ||
license = licenses.gpl2Plus; | ||
maintainers = with maintainers; [ peterhoeg ]; | ||
platforms = platforms.all; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.