diff --git a/pkgs/by-name/la/lanraragi/lower-version-reqs.patch b/pkgs/by-name/la/lanraragi/lower-version-reqs.patch new file mode 100644 index 000000000000..ee590f206fdc --- /dev/null +++ b/pkgs/by-name/la/lanraragi/lower-version-reqs.patch @@ -0,0 +1,13 @@ +diff --git a/tools/cpanfile b/tools/cpanfile +index e70c6e7..1fb5860 100644 +--- a/tools/cpanfile ++++ b/tools/cpanfile +@@ -33,7 +33,7 @@ requires 'Test::Harness', 3.42; + requires 'Test::MockObject', 1.20200122; + requires 'Test::Trap', 0.3.4; + requires 'Test::Deep', 1.130; +-requires 'Test::MockModule', 0.180; ++requires 'Test::MockModule', 0.177; + + # Mojo stuff + requires 'Mojolicious', 9.39; diff --git a/pkgs/by-name/la/lanraragi/package.nix b/pkgs/by-name/la/lanraragi/package.nix index 6d98a0d42a96..407fef1f22d7 100644 --- a/pkgs/by-name/la/lanraragi/package.nix +++ b/pkgs/by-name/la/lanraragi/package.nix @@ -3,21 +3,23 @@ stdenv, buildNpmPackage, fetchFromGitHub, + replaceVars, makeBinaryWrapper, perl, ghostscript, + vips, nixosTests, }: buildNpmPackage rec { pname = "lanraragi"; - version = "0.9.50"; + version = "0.9.60"; src = fetchFromGitHub { owner = "Difegue"; repo = "LANraragi"; tag = "v.${version}"; - hash = "sha256-WwAY74sFPFJNfrTcGfXEZE8svuOxoCXR70SFyHb2Y40="; + hash = "sha256-ieYil/3n8iSWdfO6MQ1sW8q/TnQekpCx24n/BDfeLNg="; }; patches = [ @@ -28,16 +30,23 @@ buildNpmPackage rec { # Skip running `npm ci` and unnecessary build-time checks ./install.patch + # Lower the version requirement of Test::MockModule + ./lower-version-reqs.patch + # Don't assume that the cwd is $out/share/lanraragi # Put logs and temp files into the cwd by default, instead of into $out/share/lanraragi ./fix-paths.patch + (replaceVars ./vips-lib-path.patch { + vips_lib = "${lib.getLib vips}/lib"; + }) + # Expose the password hashing logic that can be used by the NixOS module # to set the admin password ./expose-password-hashing.patch ]; - npmDepsHash = "sha256-+vS/uoEmJJM3G9jwdwQTlhV0VkjAhhVd60x+PcYyWSw="; + npmDepsHash = "sha256-9SuimhLvEuruvFXuFm62DzgldngfiJneV6MDedGy6LY="; nativeBuildInputs = [ perl @@ -88,6 +97,7 @@ buildNpmPackage rec { CHI # CHI::Driver::FastMmap (part of CHI) CacheFastMmap + FFIPlatypus ] # deps listed in `tools/install.pm`: ++ [ @@ -116,6 +126,7 @@ buildNpmPackage rec { TestMockObject TestTrap TestDeep + TestMockModule ]; checkPhase = '' diff --git a/pkgs/by-name/la/lanraragi/vips-lib-path.patch b/pkgs/by-name/la/lanraragi/vips-lib-path.patch new file mode 100644 index 000000000000..44aafc789af3 --- /dev/null +++ b/pkgs/by-name/la/lanraragi/vips-lib-path.patch @@ -0,0 +1,13 @@ +diff --git a/lib/LANraragi/Utils/Vips.pm b/lib/LANraragi/Utils/Vips.pm +index fba395e..0579bdc 100644 +--- a/lib/LANraragi/Utils/Vips.pm ++++ b/lib/LANraragi/Utils/Vips.pm +@@ -20,7 +20,7 @@ my $glib_ffi = undef; + my $gobject_ffi = undef; + + if (IS_UNIX) { +- my @vips_libs = find_lib(lib => [ 'vips', 'vips-42' ]); ++ my @vips_libs = find_lib(lib => [ 'vips', 'vips-42' ], libpath => '@vips_lib@'); + my $lib_path; + + if (@vips_libs) { diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 4886e9aa6060..1791abfe97d8 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -12997,10 +12997,10 @@ with self; FFIPlatypus = buildPerlPackage { pname = "FFI-Platypus"; - version = "2.09"; + version = "2.10"; src = fetchurl { - url = "mirror://cpan/authors/id/P/PL/PLICEASE/FFI-Platypus-2.09.tar.gz"; - hash = "sha256-nTEjEiieeHNbRcMRt6wWqejaCT93m/aUaccK+sTdW2M="; + url = "mirror://cpan/authors/id/P/PL/PLICEASE/FFI-Platypus-2.10.tar.gz"; + hash = "sha256-ZxFcAjF7I9EZtu4aXm1fJvr4mFlD61PPiGLFcZ54+28="; }; buildInputs = [ AlienFFI