nixpkgs/pkgs/applications/misc/sigal/default.nix
Robert Helgesson bacac7cf54 sigal: fix crash when building gallery
When building a gallery using `sigal build` the process would error
out with an message along the lines of

    shutil.Error: [('/nix/store/…/static/css',
                    '/…/_build/static/css',
                    "[Errno 13] Permission denied: '/…/_build/static/css'"),
                   …
                  ]

This is caused by `shutil.copytree` copying the permissions (555) of
the directories in the Nix store and then attempting to make
modifications to the copied directory. The patch makes the copy ignore
the permissions of directories.
2022-08-31 13:06:50 +02:00

58 lines
1 KiB
Nix

{ stdenv
, lib
, python3
, ffmpeg
}:
python3.pkgs.buildPythonApplication rec {
pname = "sigal";
version = "2.3";
format = "setuptools";
src = python3.pkgs.fetchPypi {
inherit version pname;
hash = "sha256-4Zsb/OBtU/jV0gThEYe8bcrb+6hW+hnzQS19q1H409Q=";
};
patches = [ ./copytree-permissions.patch ];
propagatedBuildInputs = with python3.pkgs; [
# install_requires
jinja2
markdown
pillow
pilkit
click
blinker
natsort
# extras_require
brotli
feedgenerator
zopfli
cryptography
setuptools # needs pkg_resources
];
checkInputs = [
ffmpeg
] ++ (with python3.pkgs; [
pytestCheckHook
]);
disabledTests = lib.optionals stdenv.isDarwin [
"test_nonmedia_files"
];
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}"
];
meta = with lib; {
description = "Yet another simple static gallery generator";
homepage = "http://sigal.saimon.org/";
license = licenses.mit;
maintainers = with maintainers; [ domenkozar matthiasbeyer ];
};
}