fix calibre patch

This commit is contained in:
stubbfel
2018-02-13 21:43:59 +01:00
parent 4a590756c4
commit dab44cd760
9 changed files with 3284 additions and 11 deletions

View File

@@ -1,18 +1,22 @@
{ stdenv, fetchFromGitHub }:
with import <nixpkgs> {}; # bring all of Nixpkgs into scope
stdenv.mkDerivation rec {
name= "etherpad-${version}";
version = "1.6.2";
buildInputs = [nodejs nodePackages.node2nix curl];
src = fetchFromGitHub {
owner = "ether";
repo = " etherpad-lite";
repo = "etherpad-lite";
rev = "${version}";
sha256 = "1zzx851603apysmzgxn6zqg779yak8r5vnafycy454wcgq6lb0bf";
sha256 = "10fgyzhxhrqk2nnwwn287nrcgzq7dizm0vhw05205b3s6gh4hy5q";
};
installPhase = ''
mkdir -p $out/
cp -R . $out/
cp $out/settings.json.template $out/settings.json
# cd $out/src
# node2nix -i package.json --flatten
'';
}

View File

@@ -1,7 +1,15 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.etherpad;
ethernet-pkg = import ./etherpad-pkg.nix;
nodePackages = import ./node-packages.nix;
in
{
imports = [ ./etherpad-pkg.nix ];
###### interface
@@ -23,13 +31,15 @@
###### implementation
config = mkIf config.etherpad.news2kindle.enable{
environment.systemPackages = [pkgs.etherpad pkgs.nosdejs];
config = mkIf cfg.enable {
environment.systemPackages = [nodePackages ethernet-pkg pkgs.nodejs pkgs.curl];
systemd.services.etherpad = {
description = "etherpad service";
serviceConfig = {
Type = "forking";
ExecStart = "${pkgs.etherpad}/bin/run.sh";
Type = "simple";
Restart = "always";
User = "etherpad";
ExecStart = "${pkgs.nodejs} ${ethernet-pkg}/src/node/server.js";
};
wantedBy = [ "multi-user.target" ];
};

File diff suppressed because it is too large Load Diff