mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 11:34:13 +00:00
nextcloudXXPackages.apps.recognize: suport nextcloud 29 and 28
This commit is contained in:
parent
ed5608b888
commit
0479e6ee96
@ -9,23 +9,48 @@
|
|||||||
|
|
||||||
# Current derivation only suports linux-x86_64 (contributions welcome, without libTensorflow builtin webassembly can be used)
|
# Current derivation only suports linux-x86_64 (contributions welcome, without libTensorflow builtin webassembly can be used)
|
||||||
useLibTensorflow ? stdenv.isx86_64 && stdenv.isLinux,
|
useLibTensorflow ? stdenv.isx86_64 && stdenv.isLinux,
|
||||||
|
|
||||||
|
ncVersion,
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
latestVersionForNc = {
|
||||||
|
"30" = {
|
||||||
|
version = "8.2.0";
|
||||||
|
appHash = "sha256-CAORqBdxNQ0x+xIVY2zI07jvsKHaa7eH0jpVuP0eSW4=";
|
||||||
|
modelHash = "sha256-s8MQOLU490/Vr/U4GaGlbdrykOAQOKeWE5+tCzn6Dew=";
|
||||||
|
};
|
||||||
|
"29" = {
|
||||||
|
version = "7.1.0";
|
||||||
|
appHash = "sha256-qR4SrTHFAc4YWiZAsL94XcH4VZqYtkRLa0y+NdiFZus=";
|
||||||
|
modelHash = "sha256-M/j5wVOBLR7xMVJQWDUWAzLajRUBYEzHSNBsRSBUgfM=";
|
||||||
|
};
|
||||||
|
"28" = {
|
||||||
|
# Once this version is no longer supported, we can remove the getAppValue replacements below
|
||||||
|
# The getAppValueString stuff will need to remain
|
||||||
|
version = "6.1.0";
|
||||||
|
appHash = "sha256-225r2JnDOoURvLmzpmHp/QL6GDx9124/YTywbxH3/rk=";
|
||||||
|
modelHash = "sha256-4mhQM/ajpwjqTb8jSbEIdtSRrWZEOaMZQXAwcfSRQ/M=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
currentVersionInfo = latestVersionForNc.${ncVersion};
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
pname = "nextcloud-app-recognise";
|
pname = "nextcloud-app-recognise";
|
||||||
version = "8.2.0";
|
version = currentVersionInfo.version;
|
||||||
|
|
||||||
srcs =
|
srcs =
|
||||||
[
|
[
|
||||||
(fetchurl {
|
(fetchurl {
|
||||||
inherit version;
|
inherit version;
|
||||||
url = "https://github.com/nextcloud/recognize/releases/download/v${version}/recognize-${version}.tar.gz";
|
url = "https://github.com/nextcloud/recognize/releases/download/v${version}/recognize-${version}.tar.gz";
|
||||||
hash = "sha256-CAORqBdxNQ0x+xIVY2zI07jvsKHaa7eH0jpVuP0eSW4=";
|
hash = currentVersionInfo.appHash;
|
||||||
})
|
})
|
||||||
|
|
||||||
(fetchurl {
|
(fetchurl {
|
||||||
inherit version;
|
inherit version;
|
||||||
url = "https://github.com/nextcloud/recognize/archive/refs/tags/v${version}.tar.gz";
|
url = "https://github.com/nextcloud/recognize/archive/refs/tags/v${version}.tar.gz";
|
||||||
hash = "sha256-s8MQOLU490/Vr/U4GaGlbdrykOAQOKeWE5+tCzn6Dew=";
|
hash = currentVersionInfo.modelHash;
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
++ lib.optionals useLibTensorflow [
|
++ lib.optionals useLibTensorflow [
|
||||||
@ -57,7 +82,9 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace recognize/lib/**/*.php \
|
substituteInPlace recognize/lib/**/*.php \
|
||||||
--replace-quiet "\$this->settingsService->getSetting('node_binary')" "'${nodejs}/bin/node'" \
|
--replace-quiet "\$this->settingsService->getSetting('node_binary')" "'${nodejs}/bin/node'" \
|
||||||
--replace-quiet "\$this->config->getAppValueString('node_binary', '""')" "'${nodejs}/bin/node'" \
|
--replace-quiet "\$this->config->getAppValueString('node_binary', '""')" "'${nodejs}/bin/node'" \
|
||||||
--replace-quiet "\$this->config->getAppValueString('node_binary')" "'${nodejs}/bin/node'"
|
--replace-quiet "\$this->config->getAppValueString('node_binary')" "'${nodejs}/bin/node'" \
|
||||||
|
--replace-quiet "\$this->config->getAppValue('node_binary', '""')" "'${nodejs}/bin/node'" \
|
||||||
|
--replace-quiet "\$this->config->getAppValue('node_binary')" "'${nodejs}/bin/node'"
|
||||||
test "$(grep "get[a-zA-Z]*('node_binary'" recognize/lib/**/*.php | wc -l)" -eq 0
|
test "$(grep "get[a-zA-Z]*('node_binary'" recognize/lib/**/*.php | wc -l)" -eq 0
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,4 +55,6 @@ let
|
|||||||
) generatedJson;
|
) generatedJson;
|
||||||
|
|
||||||
in
|
in
|
||||||
(lib.makeExtensible (_: (lib.makeScope newScope packages))).extend (import ./thirdparty.nix)
|
(lib.makeExtensible (_: (lib.makeScope newScope packages))).extend (
|
||||||
|
import ./thirdparty.nix { inherit ncVersion; }
|
||||||
|
)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{ ncVersion }:
|
||||||
_:
|
_:
|
||||||
{ apps, callPackage, ... }:
|
{ apps, callPackage, ... }:
|
||||||
{
|
{
|
||||||
@ -6,7 +7,7 @@ _:
|
|||||||
self: super: {
|
self: super: {
|
||||||
|
|
||||||
hmr_enabler = callPackage ./apps/hmr_enabler.nix { };
|
hmr_enabler = callPackage ./apps/hmr_enabler.nix { };
|
||||||
recognize = callPackage ./apps/recognize.nix { };
|
recognize = callPackage ./apps/recognize.nix { inherit ncVersion; };
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user