nixpkgs/pkgs/by-name/si/simp_le/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

55 lines
1.0 KiB
Nix

{
lib,
python3Packages,
fetchPypi,
bash,
}:
python3Packages.buildPythonApplication rec {
pname = "simp_le-client";
version = "0.20.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-p6+OF8MuAzcdTV4/CvZpjGaOrg7xcNuEddk7yC2sXIE=";
};
postPatch = ''
# drop upper bound of idna requirement
sed -ri "s/'(idna)<[^']+'/'\1'/" setup.py
substituteInPlace simp_le.py \
--replace "/bin/sh" "${bash}/bin/sh"
'';
# both setuptools-scm and mock are runtime dependencies
dependencies = with python3Packages; [
acme
cryptography
setuptools-scm
josepy
idna
mock
pyopenssl
pytz
six
];
checkPhase = ''
runHook preCheck
$out/bin/simp_le --test
runHook postCheck
'';
meta = with lib; {
homepage = "https://github.com/zenhack/simp_le";
description = "Simple Let's Encrypt client";
license = licenses.gpl3;
maintainers = with maintainers; [
gebner
makefu
];
platforms = platforms.linux;
};
}