nixpkgs/pkgs/by-name/fi/filesender/package.nix
2024-09-04 09:34:48 +00:00

44 lines
1002 B
Nix

{
stdenv,
fetchFromGitHub,
lib,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "filesender";
version = "2.49";
src = fetchFromGitHub {
owner = "filesender";
repo = "filesender";
rev = "filesender-${finalAttrs.version}";
hash = "sha256-GNhborbwV9G2x7pLDyxGVCtTf4AIaMYQGAKNJPzedzo=";
};
patches = [
# /nix/store is read-only, but filesender searches config and logs inside of installation directory.
# This patch changes search directories to FILESENDER_CONFIG_DIR and FILESENDER_LOG_DIR environment variables.
./separate_mutable_paths.patch
];
installPhase = ''
runHook preInstall
mkdir -p $out/
cp -R . $out/
runHook postInstall
'';
passthru.tests = {
inherit (nixosTests) filesender;
};
meta = {
description = "Web application for sending large files to other users";
homepage = "https://filesender.org/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ nhnn ];
};
})