Unverified Commit a534b51b authored by TomaSajt's avatar TomaSajt
Browse files

lanraragi: 0.9.50 -> 0.9.60

parent bc7e430c
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
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;
+14 −3
Original line number Diff line number Diff line
@@ -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 = ''
+13 −0
Original line number Diff line number Diff line
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) {