···3 lib,
4 buildNpmPackage,
5 fetchFromGitHub,
6- versionCheckHook,
7 nix-update-script,
0000008}:
910buildNpmPackage (finalAttrs: {
11 pname = "filen-cli";
12- version = "0.0.29";
1314 src = fetchFromGitHub {
15 owner = "FilenCloudDienste";
16 repo = "filen-cli";
17 tag = "v${finalAttrs.version}";
18- hash = "sha256-ftbRv75x6o1HgElY4oLBBe5SRuLtxdrjpjZznSCyroI=";
19 };
2021- npmDepsHash = "sha256-a+sq0vFsk4c7bl0Nn2KfBFxyq3ZF2HPvt8d1vxegnHg=";
000000000000000000000002223 postPatch = ''
24- # The filen-cli repository does not contain the correct version string;
25- # it is replaced during publishing in the same way:
26 # https://github.com/FilenCloudDienste/filen-cli/blob/c7d5eb2a2cd6d514321992815f16475f6909af36/.github/workflows/build-and-publish.yml#L24
27 substituteInPlace package.json \
28- --replace-fail '"version": "0.0.0"' '"version": "${finalAttrs.version}"'
0029 '';
3031- # A special random 256-bit string called CRYPTO_BASE_KEY has to be injected
32- # during build. It can be randomly generated using the generateKey.mjs
33- # script, however, generating a key here will invalidate the session on every
34- # rebuild, and hence we need to provide a constant key. The key below is
35- # extracted from the official filen-cli releases. Example:
36- # $ strings filen-cli-v0.0.29-linux-x64 | grep checkInjectedBuildInfo -A 6
37- # That also makes the session data compatible with the official distribution.
38- env.FILEN_CLI_CRYPTO_BASE_KEY = "f47fb2011c90d8aad21f7415d19989cea2c1ac8bc674daf36af48de8697a83e0";
003940 nativeInstallCheckInputs = [ versionCheckHook ];
41 versionCheckProgram = "${placeholder "out"}/bin/filen";