nixpkgs/pkgs/by-name/s3/s3ql/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

72 lines
1.4 KiB
Nix

{
lib,
fetchFromGitHub,
python3,
sqlite,
which,
nix-update-script,
}:
python3.pkgs.buildPythonApplication rec {
pname = "s3ql";
version = "5.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "s3ql";
repo = "s3ql";
rev = "refs/tags/s3ql-${version}";
hash = "sha256-D+fUl9UpJ7vxoVzB6MlrgnyAqEYbUkc+0w6iepYuZnk=";
};
build-system = with python3.pkgs; [ setuptools ];
nativeBuildInputs = [ which ] ++ (with python3.pkgs; [ cython ]);
propagatedBuildInputs = with python3.pkgs; [
apsw
cryptography
defusedxml
dugong
google-auth
google-auth-oauthlib
pyfuse3
requests
sqlite
trio
];
nativeCheckInputs = with python3.pkgs; [
pytest-trio
pytestCheckHook
];
preBuild = ''
${python3.pkgs.python.pythonOnBuildForHost.interpreter} ./setup.py build_cython build_ext --inplace
'';
preCheck = ''
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [ "s3ql" ];
pytestFlagsArray = [ "tests/" ];
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"s3ql-([0-9.]+)"
];
};
meta = with lib; {
description = "Full-featured file system for online data storage";
homepage = "https://github.com/s3ql/s3ql/";
changelog = "https://github.com/s3ql/s3ql/releases/tag/s3ql-${version}";
license = licenses.gpl3Only;
maintainers = with maintainers; [ rushmorem ];
platforms = platforms.linux;
};
}