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

@@ -14,7 +14,7 @@
./programs/installed.nix ./programs/installed.nix
./services/enabled.nix ./services/enabled.nix
./users.nix ./users.nix
./module/news2kindle/news2kindle.nix ./module/news2kindle/news2kindle.nix
./module/etherpad/etherpad.nix ./module/etherpad/etherpad.nix
]; ];

16
default.nix Normal file
View 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;
}

View File

@@ -1,18 +1,22 @@
{ stdenv, fetchFromGitHub }: with import <nixpkgs> {}; # bring all of Nixpkgs into scope
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name= "etherpad-${version}"; name= "etherpad-${version}";
version = "1.6.2"; version = "1.6.2";
buildInputs = [nodejs nodePackages.node2nix curl];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ether"; owner = "ether";
repo = " etherpad-lite"; repo = "etherpad-lite";
rev = "${version}"; rev = "${version}";
sha256 = "1zzx851603apysmzgxn6zqg779yak8r5vnafycy454wcgq6lb0bf"; sha256 = "10fgyzhxhrqk2nnwwn287nrcgzq7dizm0vhw05205b3s6gh4hy5q";
}; };
installPhase = '' installPhase = ''
mkdir -p $out/ mkdir -p $out/
cp -R . $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, ... }: { 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 ###### interface
@@ -23,13 +31,15 @@
###### implementation ###### implementation
config = mkIf config.etherpad.news2kindle.enable{ config = mkIf cfg.enable {
environment.systemPackages = [pkgs.etherpad pkgs.nosdejs]; environment.systemPackages = [nodePackages ethernet-pkg pkgs.nodejs pkgs.curl];
systemd.services.etherpad = { systemd.services.etherpad = {
description = "etherpad service"; description = "etherpad service";
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "simple";
ExecStart = "${pkgs.etherpad}/bin/run.sh"; Restart = "always";
User = "etherpad";
ExecStart = "${pkgs.nodejs} ${ethernet-pkg}/src/node/server.js";
}; };
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
}; };

File diff suppressed because it is too large Load Diff

View 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',

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, fetchurl, ... }:
with lib; with lib;
@@ -55,6 +55,10 @@ calibreWithRecipes = pkgs.calibre.overrideAttrs (oldAttrs: rec {
''+ oldAttrs.installPhase ; ''+ oldAttrs.installPhase ;
buildInputs = (remove pkgs.python2Packages.odfpy oldAttrs.buildInputs) ++ [odfpyNoTest]; buildInputs = (remove pkgs.python2Packages.odfpy oldAttrs.buildInputs) ++ [odfpyNoTest];
# patches = oldAttrs.patches ++ [./calibre-disable_plugins.patch];
patches = [./calibre-disable_plugins.patch];
}); });

View File

@@ -11,6 +11,6 @@
./news2kindle.nix ./news2kindle.nix
./resilio.nix ./resilio.nix
./sks.nix ./sks.nix
./etherpad.nix # ./etherpad.nix
]; ];
} }

View File

@@ -11,6 +11,7 @@ in
{ {
users = { users = {
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
extraUsers.etherpad = myPublicSshKeys // { isNormalUser = true; home = "/home/etherpad";};
extraUsers.sshuser = myPublicSshKeys // { isNormalUser = true; home = "/home/sshuser";}; extraUsers.sshuser = myPublicSshKeys // { isNormalUser = true; home = "/home/sshuser";};
extraUsers.nextcloud = myPublicSshKeys // { isNormalUser = true; home = "/home/nextcloud"; group = "nextcloud";}; extraUsers.nextcloud = myPublicSshKeys // { isNormalUser = true; home = "/home/nextcloud"; group = "nextcloud";};
extraUsers.ledebuild = myPublicSshKeys // { isNormalUser = true; home = "/home/ledebuild";}; extraUsers.ledebuild = myPublicSshKeys // { isNormalUser = true; home = "/home/ledebuild";};