mirror of
https://github.com/9001/copyparty.git
synced 2026-11-10 12:28:23 +00:00
fix(nix): separate makeWrapperArgs properly (#1676)
* fix(nix): separate makeWrapperArgs properly Since Python packages are now built with `__structuredAttrs = true;` in nixpkgs, this is neccesary. See also: https://github.com/NixOS/nixpkgs/commit/a8383b633210925071f3d7c680c8d901939c7fd5 See also: https://github.com/NixOS/nixpkgs/pull/554025 * chore(nix): nixfmt
This commit is contained in:
1 parent
8b4593c9a2
commit
1af7efeca8
1 file changed
+36
-27
@@ -91,19 +91,20 @@ let
|
|||||||
day = builtins.substring 6 2 lastModifiedDate;
|
day = builtins.substring 6 2 lastModifiedDate;
|
||||||
};
|
};
|
||||||
# ex: "1970" "1" "1"
|
# ex: "1970" "1" "1"
|
||||||
dateStringsShort = builtins.mapAttrs (_: val: toString (lib.toIntBase10 val)) dateStringsZeroPrefixed;
|
dateStringsShort = builtins.mapAttrs (
|
||||||
|
_: val: toString (lib.toIntBase10 val)
|
||||||
|
) dateStringsZeroPrefixed;
|
||||||
unstableVersion =
|
unstableVersion =
|
||||||
if copypartyFlake == null then
|
if copypartyFlake == null then
|
||||||
"${pinData.version}-unstable"
|
"${pinData.version}-unstable"
|
||||||
else
|
else
|
||||||
with dateStringsZeroPrefixed; "${pinData.version}-unstable-${year}-${month}-${day}"
|
with dateStringsZeroPrefixed; "${pinData.version}-unstable-${year}-${month}-${day}";
|
||||||
;
|
|
||||||
version = if stable then pinData.version else unstableVersion;
|
version = if stable then pinData.version else unstableVersion;
|
||||||
stableSrc = fetchurl {
|
stableSrc = fetchurl {
|
||||||
inherit (pinData) url hash;
|
inherit (pinData) url hash;
|
||||||
};
|
};
|
||||||
root = ../../../..;
|
root = ../../../..;
|
||||||
unstableSrc = nix-gitignore.gitignoreSource [] root;
|
unstableSrc = nix-gitignore.gitignoreSource [ ] root;
|
||||||
src = if stable then stableSrc else unstableSrc;
|
src = if stable then stableSrc else unstableSrc;
|
||||||
rev = copypartyFlake.shortRev or copypartyFlake.dirtyShortRev or "unknown";
|
rev = copypartyFlake.shortRev or copypartyFlake.dirtyShortRev or "unknown";
|
||||||
unstableCodename = "unstable" + (lib.optionalString (copypartyFlake != null) "-${rev}");
|
unstableCodename = "unstable" + (lib.optionalString (copypartyFlake != null) "-${rev}");
|
||||||
@@ -125,30 +126,38 @@ buildPythonApplication {
|
|||||||
old_src_folder="''${folders[0]}"
|
old_src_folder="''${folders[0]}"
|
||||||
cp -r "$old_src_folder"/copyparty/web/deps copyparty/web/deps
|
cp -r "$old_src_folder"/copyparty/web/deps copyparty/web/deps
|
||||||
sed -i 's/^CODENAME =.*$/CODENAME = "${unstableCodename}"/' copyparty/__version__.py
|
sed -i 's/^CODENAME =.*$/CODENAME = "${unstableCodename}"/' copyparty/__version__.py
|
||||||
${lib.optionalString (copypartyFlake != null) (with dateStringsShort; ''
|
${lib.optionalString (copypartyFlake != null) (
|
||||||
sed -i 's/^BUILD_DT =.*$/BUILD_DT = (${year}, ${month}, ${day})/' copyparty/__version__.py
|
with dateStringsShort;
|
||||||
'')}
|
''
|
||||||
|
sed -i 's/^BUILD_DT =.*$/BUILD_DT = (${year}, ${month}, ${day})/' copyparty/__version__.py
|
||||||
|
''
|
||||||
|
)}
|
||||||
'';
|
'';
|
||||||
dependencies =
|
dependencies = [
|
||||||
[
|
jinja2
|
||||||
jinja2
|
fusepy
|
||||||
fusepy
|
]
|
||||||
]
|
++ lib.optional withSMB impacket
|
||||||
++ lib.optional withSMB impacket
|
++ lib.optional withSFTP paramiko
|
||||||
++ lib.optional withSFTP paramiko
|
++ lib.optional withFTP pyftpdlib
|
||||||
++ lib.optional withFTP pyftpdlib
|
++ lib.optional withFTPS pyopenssl
|
||||||
++ lib.optional withFTPS pyopenssl
|
++ lib.optional withTFTP partftpy
|
||||||
++ lib.optional withTFTP partftpy
|
++ lib.optional withCertgen cfssl
|
||||||
++ lib.optional withCertgen cfssl
|
++ lib.optional withThumbnails pillow
|
||||||
++ lib.optional withThumbnails pillow
|
++ lib.optional withFastThumbnails pyvips
|
||||||
++ lib.optional withFastThumbnails pyvips
|
++ lib.optional withMediaProcessing ffmpeg
|
||||||
++ lib.optional withMediaProcessing ffmpeg
|
++ lib.optional withBasicAudioMetadata mutagen
|
||||||
++ lib.optional withBasicAudioMetadata mutagen
|
++ lib.optional withHashedPasswords argon2-cffi
|
||||||
++ lib.optional withHashedPasswords argon2-cffi
|
++ lib.optional withZeroMQ pyzmq
|
||||||
++ lib.optional withZeroMQ pyzmq
|
++ lib.optional withMagic magic
|
||||||
++ lib.optional withMagic magic
|
++ (extraPythonPackages python.pkgs);
|
||||||
++ (extraPythonPackages python.pkgs);
|
|
||||||
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath runtimeDeps}" ];
|
makeWrapperArgs = [
|
||||||
|
"--prefix"
|
||||||
|
"PATH"
|
||||||
|
":"
|
||||||
|
(lib.makeBinPath runtimeDeps)
|
||||||
|
];
|
||||||
|
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
build-system = [
|
build-system = [
|
||||||
|
|||||||
Reference in new issue
Block a user