invoiceplane: 1.5.11 -> 1.6-beta-1

This commit is contained in:
Jonas Heinrich 2022-10-02 14:46:51 +02:00
parent faacb60b6e
commit a6e8bd09f3
3 changed files with 7 additions and 38 deletions

View file

@ -36,10 +36,10 @@ let
version = src.version; version = src.version;
src = pkgs.invoiceplane; src = pkgs.invoiceplane;
patchPhase = '' postPhase = ''
# Patch index.php file to load additional config file # Patch index.php file to load additional config file
substituteInPlace index.php \ substituteInPlace index.php \
--replace "require('vendor/autoload.php');" "require('vendor/autoload.php'); \$dotenv = new \Dotenv\Dotenv(__DIR__, 'extraConfig.php'); \$dotenv->load();"; --replace "require('vendor/autoload.php');" "require('vendor/autoload.php'); \$dotenv = Dotenv\Dotenv::createImmutable(__DIR__, 'extraConfig.php'); \$dotenv->load();";
''; '';
installPhase = '' installPhase = ''

View file

@ -13,12 +13,12 @@ import ./make-test-python.nix ({ pkgs, ... }:
services.invoiceplane.webserver = "caddy"; services.invoiceplane.webserver = "caddy";
services.invoiceplane.sites = { services.invoiceplane.sites = {
"site1.local" = { "site1.local" = {
#database.name = "invoiceplane1"; database.name = "invoiceplane1";
database.createLocally = true; database.createLocally = true;
enable = true; enable = true;
}; };
"site2.local" = { "site2.local" = {
#database.name = "invoiceplane2"; database.name = "invoiceplane2";
database.createLocally = true; database.createLocally = true;
enable = true; enable = true;
}; };

View file

@ -2,51 +2,20 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "invoiceplane"; pname = "invoiceplane";
version = "1.5.11"; version = "1.6-beta-1";
src = fetchurl { src = fetchurl {
url = "https://github.com/InvoicePlane/InvoicePlane/releases/download/v${version}/v${version}.zip"; url = "https://github.com/InvoicePlane/InvoicePlane/releases/download/v${version}/v${version}.zip";
sha256 = "137g0xps4kb3j7f5gz84ql18iggbya6d9dnrfp05g2qcbbp8kqad"; sha256 = "sha256-hIbk9zzqbwv2kSFClgPfTObB1YHj7KR4swKjGoN2v2E=";
}; };
patches = [
# Fix CVE-2021-29024, unauthenticated directory listing
# Should be included in a later release > 1.5.11
# https://github.com/NixOS/nixpkgs/issues/166655
# https://github.com/InvoicePlane/InvoicePlane/pull/754
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/InvoicePlane/InvoicePlane/pull/754.patch";
sha256 = "sha256-EHXw7Zqli/nA3tPIrhxpt8ueXvDtshz0XRzZT78sdQk=";
})
# Fix CVE-2021-29023, password reset rate-limiting
# Should be included in a later release > 1.5.11
# https://github.com/NixOS/nixpkgs/issues/166655
# https://github.com/InvoicePlane/InvoicePlane/pull/739
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/InvoicePlane/InvoicePlane/pull/739.patch";
sha256 = "sha256-6ksJjW6awr3lZsDRxa22pCcRGBVBYyV8+TbhOp6HBq0=";
})
# Fix CVE-2021-29022, full path disclosure
# Should be included in a later release > 1.5.11
# https://github.com/NixOS/nixpkgs/issues/166655
# https://github.com/InvoicePlane/InvoicePlane/pull/767
#(fetchpatch {
# url = "https://patch-diff.githubusercontent.com/raw/InvoicePlane/InvoicePlane/pull/767.patch";
# sha256 = "sha256-rSWDH8KeHSRWLyQEa7RSwv+8+ja9etTz+6Q9XThuwUo=";
#})
];
nativeBuildInputs = [ unzip ]; nativeBuildInputs = [ unzip ];
sourceRoot = "."; sourceRoot = ".";
installPhase = '' installPhase = ''
mkdir -p $out/ mkdir -p $out/
cp -r . $out/ cp -r ip/. $out/
''; '';
passthru.tests = { passthru.tests = {