fix calibre patch
This commit is contained in:
16
default.nix
Normal file
16
default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
# This file has been generated by node2nix 1.5.1. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-4_x"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ./node-env.nix {
|
||||
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
|
||||
inherit nodejs;
|
||||
};
|
||||
in
|
||||
import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl fetchgit;
|
||||
inherit nodeEnv;
|
||||
}
|
||||
@@ -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
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -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" ];
|
||||
};
|
||||
|
||||
3221
module/etherpad/node-packages.nix
Normal file
3221
module/etherpad/node-packages.nix
Normal file
File diff suppressed because it is too large
Load Diff
17
module/news2kindle/calibre-disable_plugins.patch
Normal file
17
module/news2kindle/calibre-disable_plugins.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
Description: Disable plugin dialog. It uses a totally non-authenticated and non-trusted way of installing arbitrary code.
|
||||
Author: Martin Pitt <mpitt@debian.org>
|
||||
Bug-Debian: http://bugs.debian.org/640026
|
||||
|
||||
Index: calibre-0.8.29+dfsg/src/calibre/gui2/actions/preferences.py
|
||||
===================================================================
|
||||
--- calibre-0.8.29+dfsg.orig/src/calibre/gui2/actions/preferences.py 2011-12-16 05:49:14.000000000 +0100
|
||||
+++ calibre-0.8.29+dfsg/src/calibre/gui2/actions/preferences.py 2011-12-20 19:29:04.798468930 +0100
|
||||
@@ -28,8 +28,6 @@
|
||||
pm.addAction(QIcon(I('config.png')), _('Preferences'), self.do_config)
|
||||
cm('welcome wizard', _('Run welcome wizard'),
|
||||
icon='wizard.png', triggered=self.gui.run_wizard)
|
||||
- cm('plugin updater', _('Get plugins to enhance calibre'),
|
||||
- icon='plugins/plugin_updater.png', triggered=self.get_plugins)
|
||||
if not DEBUG:
|
||||
pm.addSeparator()
|
||||
cm('restart', _('Restart in debug mode'), icon='debug.png',
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, fetchurl, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
@@ -55,6 +55,10 @@ calibreWithRecipes = pkgs.calibre.overrideAttrs (oldAttrs: rec {
|
||||
''+ oldAttrs.installPhase ;
|
||||
|
||||
buildInputs = (remove pkgs.python2Packages.odfpy oldAttrs.buildInputs) ++ [odfpyNoTest];
|
||||
|
||||
# patches = oldAttrs.patches ++ [./calibre-disable_plugins.patch];
|
||||
patches = [./calibre-disable_plugins.patch];
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
./news2kindle.nix
|
||||
./resilio.nix
|
||||
./sks.nix
|
||||
./etherpad.nix
|
||||
# ./etherpad.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ in
|
||||
{
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
extraUsers.etherpad = myPublicSshKeys // { isNormalUser = true; home = "/home/etherpad";};
|
||||
extraUsers.sshuser = myPublicSshKeys // { isNormalUser = true; home = "/home/sshuser";};
|
||||
extraUsers.nextcloud = myPublicSshKeys // { isNormalUser = true; home = "/home/nextcloud"; group = "nextcloud";};
|
||||
extraUsers.ledebuild = myPublicSshKeys // { isNormalUser = true; home = "/home/ledebuild";};
|
||||
|
||||
Reference in New Issue
Block a user