Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-10-28 12:01:19 +00:00 committed by GitHub
commit 519b7ea0c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
121 changed files with 1061 additions and 29872 deletions

1
.github/CODEOWNERS vendored
View File

@ -116,7 +116,6 @@
/maintainers/scripts/update-python-libraries @FRidh
/pkgs/development/interpreters/python @FRidh
/doc/languages-frameworks/python.section.md @FRidh @mweinelt
/pkgs/development/tools/poetry2nix @adisbladis
/pkgs/development/interpreters/python/hooks @FRidh @jonringer
# Haskell

View File

@ -243,21 +243,21 @@ or
***
```
## `fetchFromBittorrent` {#fetchfrombittorrent}
## `fetchtorrent` {#fetchtorrent}
`fetchFromBittorrent` expects two arguments. `url` which can either be a Magnet URI (Magnet Link) such as `magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c` or an HTTP URL pointing to a `.torrent` file. It can also take a `config` argument which will craft a `settings.json` configuration file and give it to `transmission`, the underlying program that is performing the fetch. The available config options for `transmission` can be found [here](https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md#options)
`fetchtorrent` expects two arguments. `url` which can either be a Magnet URI (Magnet Link) such as `magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c` or an HTTP URL pointing to a `.torrent` file. It can also take a `config` argument which will craft a `settings.json` configuration file and give it to `transmission`, the underlying program that is performing the fetch. The available config options for `transmission` can be found [here](https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md#options)
```
{ fetchFromBittorrent }:
{ fetchtorrent }:
fetchFromBittorrent {
fetchtorrent {
config = { peer-limit-global = 100; };
url = "magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c";
sha256 = "";
}
```
### Parameters {#fetchfrombittorrent-parameters}
### Parameters {#fetchtorrent-parameters}
- `url`: Magnet URI (Magnet Link) such as `magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c` or an HTTP URL pointing to a `.torrent` file.

View File

@ -429,11 +429,11 @@ in
'';
};
# Activation script to append the password from the password file
# preStart script to append the password from the password file
# to the configuration files. It also fixes the owner of the
# libnss-mysql-root.cfg because it is changed to root after the
# password is appended.
system.activationScripts.mysql-auth-passwords = ''
systemd.services.mysql.preStart = ''
if [[ -r ${cfg.passwordFile} ]]; then
org_umask=$(umask)
umask 0077

View File

@ -97,12 +97,9 @@ in
nix.settings.nix-path = mkIf (! cfg.channel.enable) (mkDefault "");
system.activationScripts.nix-channel = mkIf cfg.channel.enable
(stringAfter [ "etc" "users" ] ''
# Subscribe the root user to the NixOS channel by default.
if [ ! -e "/root/.nix-channels" ]; then
echo "${config.system.defaultChannel} nixos" > "/root/.nix-channels"
fi
'');
systemd.tmpfiles.rules = lib.mkIf cfg.channel.enable [
"f /root/.nix-channels -"
''w "/root/.nix-channels" - - - - "${config.system.defaultChannel} nixos\n"''
];
};
}

View File

@ -193,8 +193,11 @@ in
source = "${pkgs.duo-unix.out}/bin/login_duo";
};
system.activationScripts = {
login_duo = mkIf cfg.ssh.enable ''
systemd.services.login-duo = lib.mkIf cfg.ssh.enable {
wantedBy = [ "sysinit.target" ];
before = [ "sysinit.target" ];
unitConfig.DefaultDependencies = false;
script = ''
if test -f "${cfg.secretKeyFile}"; then
mkdir -m 0755 -p /etc/duo
@ -209,7 +212,13 @@ in
mv -fT "$conf" /etc/duo/login_duo.conf
fi
'';
pam_duo = mkIf cfg.pam.enable ''
};
systemd.services.pam-duo = lib.mkIf cfg.ssh.enable {
wantedBy = [ "sysinit.target" ];
before = [ "sysinit.target" ];
unitConfig.DefaultDependencies = false;
script = ''
if test -f "${cfg.secretKeyFile}"; then
mkdir -m 0755 -p /etc/duo

View File

@ -275,33 +275,38 @@ in
mrpx ${wrap.source},
'') wrappers;
###### wrappers activation script
system.activationScripts.wrappers =
lib.stringAfter [ "specialfs" "users" ]
''
chmod 755 "${parentWrapperDir}"
systemd.services.suid-sgid-wrappers = {
description = "Create SUID/SGID Wrappers";
wantedBy = [ "sysinit.target" ];
before = [ "sysinit.target" ];
unitConfig.DefaultDependencies = false;
unitConfig.RequiresMountsFor = [ "/nix/store" "/run/wrappers" ];
serviceConfig.Type = "oneshot";
script = ''
chmod 755 "${parentWrapperDir}"
# We want to place the tmpdirs for the wrappers to the parent dir.
wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX)
chmod a+rx "$wrapperDir"
# We want to place the tmpdirs for the wrappers to the parent dir.
wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX)
chmod a+rx "$wrapperDir"
${lib.concatStringsSep "\n" mkWrappedPrograms}
${lib.concatStringsSep "\n" mkWrappedPrograms}
if [ -L ${wrapperDir} ]; then
# Atomically replace the symlink
# See https://axialcorps.com/2013/07/03/atomically-replacing-files-and-directories/
old=$(readlink -f ${wrapperDir})
if [ -e "${wrapperDir}-tmp" ]; then
rm --force --recursive "${wrapperDir}-tmp"
fi
ln --symbolic --force --no-dereference "$wrapperDir" "${wrapperDir}-tmp"
mv --no-target-directory "${wrapperDir}-tmp" "${wrapperDir}"
rm --force --recursive "$old"
else
# For initial setup
ln --symbolic "$wrapperDir" "${wrapperDir}"
if [ -L ${wrapperDir} ]; then
# Atomically replace the symlink
# See https://axialcorps.com/2013/07/03/atomically-replacing-files-and-directories/
old=$(readlink -f ${wrapperDir})
if [ -e "${wrapperDir}-tmp" ]; then
rm --force --recursive "${wrapperDir}-tmp"
fi
'';
ln --symbolic --force --no-dereference "$wrapperDir" "${wrapperDir}-tmp"
mv --no-target-directory "${wrapperDir}-tmp" "${wrapperDir}"
rm --force --recursive "$old"
else
# For initial setup
ln --symbolic "$wrapperDir" "${wrapperDir}"
fi
'';
};
###### wrappers consistency checks
system.checks = lib.singleton (pkgs.runCommandLocal

View File

@ -143,13 +143,11 @@ in
environment.systemPackages = [ pkgs.mlmmj ];
system.activationScripts.mlmmj = ''
${pkgs.coreutils}/bin/mkdir -p ${stateDir} ${spoolDir}/${cfg.listDomain}
${pkgs.coreutils}/bin/chown -R ${cfg.user}:${cfg.group} ${spoolDir}
${concatMapLines (createList cfg.listDomain) cfg.mailLists}
${pkgs.postfix}/bin/postmap /etc/postfix/virtual
${pkgs.postfix}/bin/postmap /etc/postfix/transport
'';
systemd.tmpfiles.rules = [
''d "${stateDir}" -''
''d "${spoolDir}/${cfg.listDomain}" -''
''Z "${spoolDir}" - "${cfg.user}" "${cfg.group}" -''
];
systemd.services.mlmmj-maintd = {
description = "mlmmj maintenance daemon";
@ -158,6 +156,11 @@ in
Group = cfg.group;
ExecStart = "${pkgs.mlmmj}/bin/mlmmj-maintd -F -d ${spoolDir}/${cfg.listDomain}";
};
preStart = ''
${concatMapLines (createList cfg.listDomain) cfg.mailLists}
${pkgs.postfix}/bin/postmap /etc/postfix/virtual
${pkgs.postfix}/bin/postmap /etc/postfix/transport
'';
};
systemd.timers.mlmmj-maintd = {

View File

@ -239,11 +239,9 @@ in
power.ups.schedulerRules = mkDefault "${pkgs.nut}/etc/upssched.conf.sample";
system.activationScripts.upsSetup = stringAfter [ "users" "groups" ]
''
# Used to store pid files of drivers.
mkdir -p /var/state/ups
'';
systemd.tmpfiles.rules = [
"d /var/state/ups -"
];
/*

View File

@ -52,25 +52,27 @@ in
'';
environment.etc."iscsi/initiatorname.iscsi".text = "InitiatorName=${cfg.name}";
system.activationScripts.iscsid = let
extraCfgDumper = optionalString (cfg.extraConfigFile != null) ''
if [ -f "${cfg.extraConfigFile}" ]; then
printf "\n# The following is from ${cfg.extraConfigFile}:\n"
cat "${cfg.extraConfigFile}"
else
echo "Warning: services.openiscsi.extraConfigFile ${cfg.extraConfigFile} does not exist!" >&2
fi
'';
in ''
(
cat ${config.environment.etc."iscsi/iscsid.conf.fragment".source}
${extraCfgDumper}
) > /etc/iscsi/iscsid.conf
'';
systemd.packages = [ cfg.package ];
systemd.services."iscsid".wantedBy = [ "multi-user.target" ];
systemd.services."iscsid" = {
wantedBy = [ "multi-user.target" ];
preStart =
let
extraCfgDumper = optionalString (cfg.extraConfigFile != null) ''
if [ -f "${cfg.extraConfigFile}" ]; then
printf "\n# The following is from ${cfg.extraConfigFile}:\n"
cat "${cfg.extraConfigFile}"
else
echo "Warning: services.openiscsi.extraConfigFile ${cfg.extraConfigFile} does not exist!" >&2
fi
'';
in ''
(
cat ${config.environment.etc."iscsi/iscsid.conf.fragment".source}
${extraCfgDumper}
) > /etc/iscsi/iscsid.conf
'';
};
systemd.sockets."iscsid".wantedBy = [ "sockets.target" ];
systemd.services."iscsi" = mkIf cfg.enableAutoLoginOut {

View File

@ -197,8 +197,9 @@ in
script = "exec ${pkgs.spiped}/bin/spiped -F `cat /etc/spiped/$1.spec`";
};
system.activationScripts.spiped = optionalString (cfg.config != {})
"mkdir -p /var/lib/spiped";
systemd.tmpfiles.rules = lib.mkIf (cfg.config != { }) [
"d /var/lib/spiped -"
];
# Setup spiped config files
environment.etc = mapAttrs' (name: cfg: nameValuePair "spiped/${name}.spec"

View File

@ -43,21 +43,21 @@ in {
# The swanctl command complains when the following directories don't exist:
# See: https://wiki.strongswan.org/projects/strongswan/wiki/Swanctldirectory
system.activationScripts.strongswan-swanctl-etc = stringAfter ["etc"] ''
mkdir -p '/etc/swanctl/x509' # Trusted X.509 end entity certificates
mkdir -p '/etc/swanctl/x509ca' # Trusted X.509 Certificate Authority certificates
mkdir -p '/etc/swanctl/x509ocsp'
mkdir -p '/etc/swanctl/x509aa' # Trusted X.509 Attribute Authority certificates
mkdir -p '/etc/swanctl/x509ac' # Attribute Certificates
mkdir -p '/etc/swanctl/x509crl' # Certificate Revocation Lists
mkdir -p '/etc/swanctl/pubkey' # Raw public keys
mkdir -p '/etc/swanctl/private' # Private keys in any format
mkdir -p '/etc/swanctl/rsa' # PKCS#1 encoded RSA private keys
mkdir -p '/etc/swanctl/ecdsa' # Plain ECDSA private keys
mkdir -p '/etc/swanctl/bliss'
mkdir -p '/etc/swanctl/pkcs8' # PKCS#8 encoded private keys of any type
mkdir -p '/etc/swanctl/pkcs12' # PKCS#12 containers
'';
systemd.tmpfiles.rules = [
"d /etc/swanctl/x509 -" # Trusted X.509 end entity certificates
"d /etc/swanctl/x509ca -" # Trusted X.509 Certificate Authority certificates
"d /etc/swanctl/x509ocsp -"
"d /etc/swanctl/x509aa -" # Trusted X.509 Attribute Authority certificates
"d /etc/swanctl/x509ac -" # Attribute Certificates
"d /etc/swanctl/x509crl -" # Certificate Revocation Lists
"d /etc/swanctl/pubkey -" # Raw public keys
"d /etc/swanctl/private -" # Private keys in any format
"d /etc/swanctl/rsa -" # PKCS#1 encoded RSA private keys
"d /etc/swanctl/ecdsa -" # Plain ECDSA private keys
"d /etc/swanctl/bliss -"
"d /etc/swanctl/pkcs8 -" # PKCS#8 encoded private keys of any type
"d /etc/swanctl/pkcs12 -" # PKCS#12 containers
];
systemd.services.strongswan-swanctl = {
description = "strongSwan IPsec IKEv1/IKEv2 daemon using swanctl";

View File

@ -249,11 +249,6 @@ in
services.xserver.displayManager.hiddenUsers = attrNames nixbldUsers;
system.activationScripts.nix = stringAfter [ "etc" "users" ]
''
install -m 0755 -d /nix/var/nix/{gcroots,profiles}/per-user
'';
# Legacy configuration conversion.
nix.settings = mkMerge [
(mkIf (isNixAtLeast "2.3pre") { sandbox-fallback = false; })

View File

@ -287,9 +287,9 @@ in
# The systemd service will fail to execute the preStart hook
# if the WorkingDirectory does not exist
system.activationScripts.mattermost = ''
mkdir -p "${cfg.statePath}"
'';
systemd.tmpfiles.rules = [
''d "${cfg.statePath}" -''
];
systemd.services.mattermost = {
description = "Mattermost chat service";

View File

@ -204,11 +204,9 @@ in
};
# Create default cert store
system.activationScripts.makeStargazerCertDir =
lib.optionalAttrs (cfg.store == /var/lib/gemini/certs) ''
mkdir -p /var/lib/gemini/certs
chown -R ${cfg.user}:${cfg.group} /var/lib/gemini/certs
'';
systemd.tmpfiles.rules = lib.mkIf (cfg.store == /var/lib/gemini/certs) [
''d /var/lib/gemini/certs - "${cfg.user}" "${cfg.group}" -''
];
users.users = lib.optionalAttrs (cfg.user == "stargazer") {
stargazer = {

View File

@ -55,10 +55,6 @@ let
# used as a garbage collection root.
ln -sfn "$(readlink -f "$systemConfig")" /run/current-system
# Prevent the current configuration from being garbage-collected.
mkdir -p /nix/var/nix/gcroots
ln -sfn /run/current-system /nix/var/nix/gcroots/current-system
exit $_status
'';
@ -233,23 +229,16 @@ in
config = {
system.activationScripts.stdio = ""; # obsolete
system.activationScripts.var = ""; # obsolete
system.activationScripts.specialfs = ""; # obsolete
system.activationScripts.var =
''
# Various log/runtime directories.
mkdir -p /var/tmp
chmod 1777 /var/tmp
# Empty, immutable home directory of many system accounts.
mkdir -p /var/empty
# Make sure it's really empty
${pkgs.e2fsprogs}/bin/chattr -f -i /var/empty || true
find /var/empty -mindepth 1 -delete
chmod 0555 /var/empty
chown root:root /var/empty
${pkgs.e2fsprogs}/bin/chattr -f +i /var/empty || true
'';
systemd.tmpfiles.rules = [
# Prevent the current configuration from being garbage-collected.
"d /nix/var/nix/gcroots -"
"L+ /nix/var/nix/gcroots/current-system - - - - /run/current-system"
"D /var/empty 0555 root root -"
"h /var/empty - - - - +i"
];
system.activationScripts.usrbinenv = if config.environment.usrbinenv != null
then ''
@ -263,25 +252,6 @@ in
rmdir --ignore-fail-on-non-empty /usr/bin /usr
'';
system.activationScripts.specialfs =
''
specialMount() {
local device="$1"
local mountPoint="$2"
local options="$3"
local fsType="$4"
if mountpoint -q "$mountPoint"; then
local options="remount,$options"
else
mkdir -p "$mountPoint"
chmod 0755 "$mountPoint"
fi
mount -t "$fsType" -o "$options" "$device" "$mountPoint"
}
source ${config.system.build.earlyMountScript}
'';
systemd.user = {
services.nixos-activation = {
description = "Run user-specific NixOS activation";

View File

@ -20,17 +20,13 @@ let
optionalString fixBinary "F";
in ":${name}:${type}:${offset'}:${magicOrExtension}:${mask'}:${interpreter}:${flags}";
activationSnippet = name: { interpreter, wrapInterpreterInShell, ... }: if wrapInterpreterInShell then ''
rm -f /run/binfmt/${name}
cat > /run/binfmt/${name} << 'EOF'
#!${pkgs.bash}/bin/sh
exec -- ${interpreter} "$@"
EOF
chmod +x /run/binfmt/${name}
'' else ''
rm -f /run/binfmt/${name}
ln -s ${interpreter} /run/binfmt/${name}
'';
mkInterpreter = name: { interpreter, wrapInterpreterInShell, ... }:
if wrapInterpreterInShell
then pkgs.writeShellScript "${name}-interpreter" ''
#!${pkgs.bash}/bin/sh
exec -- ${interpreter} "$@"
''
else interpreter;
getEmulator = system: (lib.systems.elaborate { inherit system; }).emulator pkgs;
getQemuArch = system: (lib.systems.elaborate { inherit system; }).qemuArch;
@ -318,18 +314,25 @@ in {
environment.etc."binfmt.d/nixos.conf".source = builtins.toFile "binfmt_nixos.conf"
(lib.concatStringsSep "\n" (lib.mapAttrsToList makeBinfmtLine config.boot.binfmt.registrations));
system.activationScripts.binfmt = stringAfter [ "specialfs" ] ''
mkdir -p /run/binfmt
chmod 0755 /run/binfmt
${lib.concatStringsSep "\n" (lib.mapAttrsToList activationSnippet config.boot.binfmt.registrations)}
'';
systemd = lib.mkIf (config.boot.binfmt.registrations != {}) {
additionalUpstreamSystemUnits = [
"proc-sys-fs-binfmt_misc.automount"
"proc-sys-fs-binfmt_misc.mount"
"systemd-binfmt.service"
];
services.systemd-binfmt.restartTriggers = [ (builtins.toJSON config.boot.binfmt.registrations) ];
};
systemd = lib.mkMerge [
({ tmpfiles.rules = [
"d /run/binfmt 0755 -"
] ++ lib.mapAttrsToList
(name: interpreter:
"L+ /run/binfmt/${name} - - - - ${interpreter}"
)
(lib.mapAttrs mkInterpreter config.boot.binfmt.registrations);
})
(lib.mkIf (config.boot.binfmt.registrations != {}) {
additionalUpstreamSystemUnits = [
"proc-sys-fs-binfmt_misc.automount"
"proc-sys-fs-binfmt_misc.mount"
"systemd-binfmt.service"
];
services.systemd-binfmt.restartTriggers = [ (builtins.toJSON config.boot.binfmt.registrations) ];
})
];
};
}

View File

@ -269,6 +269,9 @@ in
"ata_piix"
"pata_marvell"
# NVMe
"nvme"
# Standard SCSI stuff.
"sd_mod"
"sr_mod"

View File

@ -46,6 +46,28 @@ with lib;
wantedBy = [ "sysinit.target" ];
aliases = [ "dbus-org.freedesktop.timesync1.service" ];
restartTriggers = [ config.environment.etc."systemd/timesyncd.conf".source ];
preStart = (
# Ensure that we have some stored time to prevent
# systemd-timesyncd to resort back to the fallback time. If
# the file doesn't exist we assume that our current system
# clock is good enough to provide an initial value.
''
if ! [ -f /var/lib/systemd/timesync/clock ]; then
test -d /var/lib/systemd/timesync || mkdir -p /var/lib/systemd/timesync
touch /var/lib/systemd/timesync/clock
fi
'' +
# workaround an issue of systemd-timesyncd not starting due to upstream systemd reverting their dynamic users changes
# - https://github.com/NixOS/nixpkgs/pull/61321#issuecomment-492423742
# - https://github.com/systemd/systemd/issues/12131
(lib.optionalString (versionOlder config.system.stateVersion "19.09") ''
if [ -L /var/lib/systemd/timesync ]; then
rm /var/lib/systemd/timesync
mv /var/lib/private/systemd/timesync /var/lib/systemd/timesync
fi
'')
);
};
environment.etc."systemd/timesyncd.conf".text = ''
@ -59,28 +81,5 @@ with lib;
group = "systemd-timesync";
};
users.groups.systemd-timesync.gid = config.ids.gids.systemd-timesync;
system.activationScripts.systemd-timesyncd-migration =
# workaround an issue of systemd-timesyncd not starting due to upstream systemd reverting their dynamic users changes
# - https://github.com/NixOS/nixpkgs/pull/61321#issuecomment-492423742
# - https://github.com/systemd/systemd/issues/12131
mkIf (versionOlder config.system.stateVersion "19.09") ''
if [ -L /var/lib/systemd/timesync ]; then
rm /var/lib/systemd/timesync
mv /var/lib/private/systemd/timesync /var/lib/systemd/timesync
fi
'';
system.activationScripts.systemd-timesyncd-init-clock =
# Ensure that we have some stored time to prevent systemd-timesyncd to
# resort back to the fallback time.
# If the file doesn't exist we assume that our current system clock is
# good enough to provide an initial value.
''
if ! [ -f /var/lib/systemd/timesync/clock ]; then
test -d /var/lib/systemd/timesync || mkdir -p /var/lib/systemd/timesync
touch /var/lib/systemd/timesync/clock
fi
'';
};
}

View File

@ -1406,18 +1406,12 @@ in
val = tempaddrValues.${opt}.sysctl;
in nameValuePair "net.ipv6.conf.${replaceStrings ["."] ["/"] i.name}.use_tempaddr" val));
# Set the host and domain names in the activation script. Don't
# clear it if it's not configured in the NixOS configuration,
# since it may have been set by dhcpcd in the meantime.
system.activationScripts.hostname = let
effectiveHostname = config.boot.kernel.sysctl."kernel.hostname" or cfg.hostName;
in optionalString (effectiveHostname != "") ''
hostname "${effectiveHostname}"
'';
system.activationScripts.domain =
optionalString (cfg.domain != null) ''
domainname "${cfg.domain}"
'';
systemd.services.domainname = lib.mkIf (cfg.domain != null) {
wantedBy = [ "sysinit.target" ];
before = [ "sysinit.target" ];
unitConfig.DefaultDependencies = false;
serviceConfig.ExecStart = ''domainname "${cfg.domain}"'';
};
environment.etc.hostid = mkIf (cfg.hostId != null) { source = hostidFile; };
boot.initrd.systemd.contents."/etc/hostid" = mkIf (cfg.hostId != null) { source = hostidFile; };

View File

@ -0,0 +1,16 @@
{ lib, ... }:
{
name = "activation-nix-channel";
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = {
nix.channel.enable = true;
};
testScript = ''
print(machine.succeed("cat /root/.nix-channels"))
'';
}

View File

@ -0,0 +1,18 @@
{ lib, ... }:
{
name = "activation-var";
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = { };
testScript = ''
assert machine.succeed("stat -c '%a' /var/tmp") == "1777\n"
assert machine.succeed("stat -c '%a' /var/empty") == "555\n"
assert machine.succeed("stat -c '%U' /var/empty") == "root\n"
assert machine.succeed("stat -c '%G' /var/empty") == "root\n"
assert "i" in machine.succeed("lsattr -d /var/empty")
'';
}

View File

@ -266,6 +266,8 @@ in {
esphome = handleTest ./esphome.nix {};
etc = pkgs.callPackage ../modules/system/etc/test.nix { inherit evalMinimalConfig; };
activation = pkgs.callPackage ../modules/system/activation/test.nix { };
activation-var = runTest ./activation/var.nix;
activation-nix-channel = runTest ./activation/nix-channel.nix;
etcd = handleTestOn ["x86_64-linux"] ./etcd.nix {};
etcd-cluster = handleTestOn ["x86_64-linux"] ./etcd-cluster.nix {};
etebase-server = handleTest ./etebase-server.nix {};

View File

@ -22,15 +22,14 @@ let
};
};
system.activationScripts.setup-grafana = {
deps = [ "users" ];
text = ''
mkdir -p /var/lib/grafana/dashboards
chown -R grafana:grafana /var/lib/grafana
chmod 0700 -R /var/lib/grafana/dashboards
cp ${pkgs.writeText "test.json" (builtins.readFile ./test_dashboard.json)} /var/lib/grafana/dashboards/
'';
};
systemd.tmpfiles.rules =
let
dashboard = pkgs.writeText "test.json" (builtins.readFile ./test_dashboard.json);
in
[
"d /var/lib/grafana/dashboards 0700 grafana grafana -"
"C+ /var/lib/grafana/dashboards/test.json - - - - ${dashboard}"
];
};
extraNodeConfs = {

View File

@ -31,14 +31,9 @@ in
services.opensearch.dataDir = "/var/opensearch_test";
services.opensearch.user = "open_search";
services.opensearch.group = "open_search";
system.activationScripts.createDirectory = {
text = ''
mkdir -p "/var/opensearch_test"
chown open_search:open_search /var/opensearch_test
chmod 0700 /var/opensearch_test
'';
deps = [ "users" "groups" ];
};
systemd.tmpfiles.rules = [
"d /var/opensearch_test 0700 open_search open_search -"
];
users = {
groups.open_search = {};
users.open_search = {

View File

@ -17,11 +17,16 @@ let
};
};
makeCert = { config, pkgs, ... }: {
system.activationScripts.create-test-cert = stringAfter [ "users" ] ''
${pkgs.openssl}/bin/openssl req -batch -x509 -newkey rsa -nodes -out /test-cert.pem -keyout /test-key.pem -subj /CN=${config.networking.hostName}
( umask 077; cat /test-key.pem /test-cert.pem > /test-key-and-cert.pem )
chown stunnel /test-key.pem /test-key-and-cert.pem
systemd.services.create-test-cert = {
wantedBy = [ "sysinit.target" ];
before = [ "sysinit.target" ];
unitConfig.DefaultDependencies = false;
script = ''
${pkgs.openssl}/bin/openssl req -batch -x509 -newkey rsa -nodes -out /test-cert.pem -keyout /test-key.pem -subj /CN=${config.networking.hostName}
( umask 077; cat /test-key.pem /test-cert.pem > /test-key-and-cert.pem )
chown stunnel /test-key.pem /test-key-and-cert.pem
'';
};
};
serverCommon = { pkgs, ... }: {
networking.firewall.allowedTCPPorts = [ 443 ];

View File

@ -15,12 +15,13 @@ in {
# create the path that should be migrated by our activation script when
# upgrading to a newer nixos version
system.stateVersion = "19.03";
system.activationScripts.simulate-old-timesync-state-dir = lib.mkBefore ''
rm -f /var/lib/systemd/timesync
mkdir -p /var/lib/systemd /var/lib/private/systemd/timesync
ln -s /var/lib/private/systemd/timesync /var/lib/systemd/timesync
chown systemd-timesync: /var/lib/private/systemd/timesync
'';
systemd.tmpfiles.rules = [
"r /var/lib/systemd/timesync -"
"d /var/lib/systemd -"
"d /var/lib/private/systemd/timesync -"
"L /var/lib/systemd/timesync - - - - /var/lib/private/systemd/timesync"
"d /var/lib/private/systemd/timesync - systemd-timesync systemd-timesync -"
];
});
};

View File

@ -8,13 +8,13 @@
python3Packages.buildPythonApplication rec {
pname = "pdfarranger";
version = "1.10.0";
version = "1.10.1";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-tNLy3HeHh8nBtmfJS5XhKX+KhIBnuUV2C8LwQl3mQLU=";
hash = "sha256-l//DeaIqUl6FdGFxM8yTKcTjVNvYMllorcoXoK33Iy4=";
};
nativeBuildInputs = [

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "circumflex";
version = "3.2";
version = "3.5";
src = fetchFromGitHub {
owner = "bensadeh";
repo = "circumflex";
rev = version;
hash = "sha256-3cu5Y9Z20CbFN+4/2LLM3pcXofuc8oztoZVPhDzFLas=";
hash = "sha256-w5QdFvF+kIxt27rg/uXjd+G0Dls7oYhmFew+O2NoaVg=";
};
vendorHash = "sha256-w9WDbNvnaRgZ/rpI450C7AA244AXRE8u960xZnAiXn4=";
vendorHash = "sha256-F9mzGP5b9dcmnT6TvjjbRq/isk1o8vM/5yxWUaZrnaw=";
nativeBuildInputs = [ makeWrapper ];

View File

@ -1,108 +1,56 @@
{ nixosTests
, pkgs
, poetry2nix
, lib
, overrides ? (self: super: {})
}:
{ python3 }:
let
python = python3.override {
packageOverrides = self: super: {
nixops = self.callPackage ./unwrapped.nix { };
} // (plugins self);
};
interpreter = (
poetry2nix.mkPoetryPackages {
projectDir = ./.;
python = pkgs.python310;
overrides = [
poetry2nix.defaultPoetryOverrides
(import ./poetry-git-overlay.nix { inherit pkgs; })
(
self: super: {
plugins = ps: with ps; rec {
nixops-aws = callPackage ./plugins/nixops-aws.nix { };
nixops-digitalocean = callPackage ./plugins/nixops-digitalocean.nix { };
nixops-encrypted-links = callPackage ./plugins/nixops-encrypted-links.nix { };
nixops-gce = callPackage ./plugins/nixops-gce.nix { };
nixops-hercules-ci = callPackage ./plugins/nixops-hercules-ci.nix { };
nixops-hetzner = callPackage ./plugins/nixops-hetzner.nix { };
nixops-hetznercloud = callPackage ./plugins/nixops-hetznercloud.nix { };
nixops-libvirtd = callPackage ./plugins/nixops-libvirtd.nix { };
nixops-vbox = callPackage ./plugins/nixops-vbox.nix { };
nixos-modules-contrib = callPackage ./plugins/nixos-modules-contrib.nix { };
nixops = super.nixops.overridePythonAttrs (
old: {
version = "${old.version}-pre-${lib.substring 0 7 super.nixops.src.rev or "dirty"}";
# aliases for backwards compatibility
nixops-gcp = nixops-gce;
nixops-virtd = nixops-libvirtd;
nixopsvbox = nixops-vbox;
};
postPatch = ''
substituteInPlace nixops/args.py --subst-var version
'';
# selector is a function mapping pythonPackages to a list of plugins
# e.g. nixops_unstable.withPlugins (ps: with ps; [ nixops-aws ])
withPlugins = selector: let
selected = selector (plugins python.pkgs);
in python.pkgs.toPythonApplication (python.pkgs.nixops.overridePythonAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ selected;
meta = old.meta // {
homepage = "https://github.com/NixOS/nixops";
description = "NixOS cloud provisioning and deployment tool";
maintainers = with lib.maintainers; [ adisbladis aminechikhaoui roberth ];
platforms = lib.platforms.unix;
license = lib.licenses.lgpl3;
mainProgram = "nixops";
};
# Propagating dependencies leaks them through $PYTHONPATH which causes issues
# when used in nix-shell.
postFixup = ''
rm $out/nix-support/propagated-build-inputs
'';
}
);
}
)
# User provided overrides
overrides
# Make nixops pluginable
(self: super: let
# Create a fake sphinx directory that doesn't pull the entire setup hook and incorrect python machinery
sphinx = pkgs.runCommand "sphinx" {} ''
mkdir -p $out/bin
for f in ${pkgs.python3.pkgs.sphinx}/bin/*; do
ln -s $f $out/bin/$(basename $f)
done
'';
in {
nixops = super.__toPluginAble {
drv = super.nixops;
finalDrv = self.nixops;
nativeBuildInputs = [ sphinx ];
postInstall = ''
doc_cache=$(mktemp -d)
sphinx-build -b man -d $doc_cache doc/ $out/share/man/man1
html=$(mktemp -d)
sphinx-build -b html -d $doc_cache doc/ $out/share/nixops/doc
'';
};
})
(self: super: {
cryptography = super.cryptography.overridePythonAttrs (old: {
meta = old.meta // {
knownVulnerabilities = old.meta.knownVulnerabilities or [ ]
++ lib.optionals (lib.versionOlder old.version "41.0.0") [
"CVE-2023-2650"
"CVE-2023-2975"
"CVE-2023-3446"
"CVE-2023-3817"
"CVE-2023-38325"
];
};
});
})
];
}
).python;
pkg = (interpreter.pkgs.nixops.withPlugins(ps: [
ps.nixops-aws
ps.nixops-digitalocean
ps.nixops-encrypted-links
ps.nixops-gcp
ps.nixops-hercules-ci
ps.nixops-hetzner
ps.nixopsvbox
ps.nixops-virtd
ps.nixops-hetznercloud
])).overrideAttrs (finalAttrs: prevAttrs: {
passthru = prevAttrs.passthru or {} // {
tests = prevAttrs.passthru.tests or {} //
nixosTests.nixops.unstable.passthru.override { nixopsPkg = pkg; };
passthru = old.passthru // {
plugins = plugins python.pkgs;
inherit withPlugins python;
};
});
in pkg
}));
in withPlugins (ps: [
ps.nixops-aws
ps.nixops-digitalocean
ps.nixops-encrypted-links
ps.nixops-gce
ps.nixops-hercules-ci
ps.nixops-hetzner
ps.nixops-hetznercloud
ps.nixops-libvirtd
ps.nixops-vbox
])

View File

@ -0,0 +1,56 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, boto
, boto3
, nixops
, nixos-modules-contrib
, typing-extensions
}:
buildPythonPackage {
pname = "nixops-aws";
version = "unstable-2023-08-09";
pyproject = true;
src = fetchFromGitHub {
owner = "NixOS";
repo = "nixops-aws";
rev = "8802d1cda9004ec1362815292c2a8ab95e6d64e8";
hash = "sha256-i0KjFrwpDHRch9jorccdVwnjAQiORClDUqm2R2xvwuU=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api \
--replace "poetry>=" "poetry-core>="
'';
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
propagatedBuildInputs = [
boto
boto3
nixos-modules-contrib
typing-extensions
];
pythonImportsCheck = [ "nixops_aws" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "AWS plugin for NixOps";
homepage = "https://github.com/NixOS/nixops-aws";
license = licenses.lgpl3Only;
maintainers = nixops.meta.maintainers;
};
}

View File

@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, nixops
, digital-ocean
}:
buildPythonPackage {
pname = "nixops-digitalocean";
version = "unstable-2022-08-14";
pyproject = true;
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixops-digitalocean";
rev = "e977b7f11e264a6a2bff2dcbc7b94c6a97b92fff";
hash = "sha256-aJtShvdqjAiCK5oZL0GR5cleDb4s1pJkO6UPKGd4Dgg=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api \
--replace "poetry>=" "poetry-core>="
'';
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
propagatedBuildInputs = [
digital-ocean
];
pythonImportsCheck = [ "nixops_digitalocean" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "NixOps Digitalocean plugin";
homepage = "https://github.com/nix-community/nixops-digitalocean";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ kiwi ];
};
}

View File

@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, nixops
}:
buildPythonPackage {
pname = "nixops-encrypted-links";
version = "unstable-2021-02-16";
pyproject = true;
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixops-encrypted-links";
rev = "e2f196fce15fcfb00d18c055e1ac53aec33b8fb1";
hash = "sha256-1TTbARyCfrLxF6SVNkmIKNNcLS9FVW22d9w0VRrH1os=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api \
--replace "poetry>=" "poetry-core>="
'';
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
pythonImportsCheck = [ "nixops_encrypted_links" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "EncryptedLinksTo from Nixops 1 module port";
homepage = "https://github.com/nix-community/nixops-encrypted-links";
license = licenses.mit;
maintainers = with maintainers; [ adisbladis ];
};
}

View File

@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, cryptography
, libcloud
, nixops
, nixos-modules-contrib
}:
buildPythonPackage {
pname = "nixops-gce";
version = "unstable-2023-05-26";
pyproject = true;
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixops-gce";
rev = "d13cb794aef763338f544010ceb1816fe31d7f42";
hash = "sha256-UkYf6CoUrr8yuQoe/ik6vu+UCi3ByJd0BdkS9SLEp0Q=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api \
--replace "poetry>=" "poetry-core>="
'';
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
propagatedBuildInputs = [
cryptography
libcloud
nixos-modules-contrib
];
pythonImportsCheck = [ "nixops_gcp" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "NixOps Google Cloud Backend";
homepage = "https://github.com/nix-community/nixops-gce";
license = licenses.mit;
maintainers = nixops.meta.maintainers;
};
}

View File

@ -0,0 +1,39 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, nixops
}:
buildPythonPackage {
pname = "nixops-hercules-ci";
version = "unstable-2021-10-06";
pyproject = true;
src = fetchFromGitHub {
owner = "hercules-ci";
repo = "nixops-hercules-ci";
rev = "e601d5baffd003fd5f22deeaea0cb96444b054dc";
hash = "sha256-4IZ+qzhERJIhLcIq9FvVml+xAFJ8R4QpUjFRw2DZl2U=";
};
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
pythonImportsCheck = [ "nixops_hercules_ci" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "Use Hercules CI as a NixOps backend";
homepage = "https://github.com/hercules-ci/nixops-hercules-ci";
license = licenses.asl20;
maintainers = with maintainers; [ roberth ];
};
}

View File

@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, hetzner
, nixops
, nixos-modules-contrib
, typing-extensions
}:
buildPythonPackage {
pname = "nixops-hetzner";
version = "unstable-2022-04-23";
pyproject = true;
src = fetchFromGitHub {
owner = "NixOS";
repo = "nixops-hetzner";
rev = "bc7a68070c7371468bcc8bf6e36baebc6bd2da35";
hash = "sha256-duK1Ui4VpbGSgGvfjTOddHSqHZ1FSy4L9Egg+FvZv04=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api \
--replace "poetry>=" "poetry-core>="
'';
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
propagatedBuildInputs = [
hetzner
nixos-modules-contrib
typing-extensions
];
pythonImportsCheck = [ "nixops_hetzner" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "Hetzner bare metal NixOps plugin";
homepage = "https://github.com/NixOS/nixops-hetzner";
license = licenses.mit;
maintainers = nixops.meta.maintainers;
};
}

View File

@ -0,0 +1,52 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, hcloud
, nixops
, typing-extensions
}:
buildPythonPackage {
pname = "nixops-hetznercloud";
version = "unstable-2023-02-19";
pyproject = true;
src = fetchFromGitHub {
owner = "lukebfox";
repo = "nixops-hetznercloud";
rev = "e14f340f7ffe9e2aa7ffbaac0b8a2e3b4cc116b3";
hash = "sha256-IsRJUUAfN6YXcue80qlcunkawUtgMiMU8mM6DP+7Cm4=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api \
--replace "poetry>=" "poetry-core>="
'';
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
propagatedBuildInputs = [
hcloud
typing-extensions
];
pythonImportsCheck = [ "nixops_hetznercloud" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "A NixOps plugin supporting Hetzner Cloud deployments";
homepage = "https://github.com/lukebfox/nixops-hetznercloud";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ lukebfox ];
};
}

View File

@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, libvirt
, nixops
}:
buildPythonPackage {
pname = "nixops-libvirtd";
version = "unstable-2023-09-01";
pyproject = true;
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixops-libvirtd";
rev = "b59424bf53e74200d684a4bce1ae64d276e793a0";
hash = "sha256-HxJu8/hOPI5aCddTpna0mf+emESYN3ZxpTkitfKcfVQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api \
--replace "poetry>=" "poetry-core>="
'';
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
propagatedBuildInputs = [
libvirt
];
pythonImportsCheck = [ "nixops_virtd" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "NixOps libvirtd backend plugin";
homepage = "https://github.com/nix-community/nixops-libvirtd";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ aminechikhaoui ];
};
}

View File

@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, nixops
}:
buildPythonPackage {
pname = "nixops-vbox";
version = "unstable-2023-08-10";
pyproject = true;
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixops-vbox";
rev = "baa5f09c9ae9aaf639c95192460ab5dcbe83a883";
hash = "sha256-QrxherQO1t0VpYjJSEbntUWVD6GW4MtVHiKINpzHA1M=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api \
--replace "poetry>=" "poetry-core>="
'';
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
pythonImportsCheck = [ "nixopsvbox" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "NixOps plugin for VirtualBox VMs";
homepage = "https://github.com/nix-community/nixops-vbox";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ aminechikhaoui ];
};
}

View File

@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, nixops
}:
buildPythonPackage {
pname = "nixos-modules-contrib";
version = "unstable-2021-01-20";
pyproject = true;
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixos-modules-contrib";
rev = "81a1c2ef424dcf596a97b2e46a58ca73a1dd1ff8";
hash = "sha256-/RSStpkAxWpUB5saQ8CmQZljFjJyUMOrR1+GiHJR2Tg=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api \
--replace "poetry>=" "poetry-core>="
'';
nativeBuildInputs = [
poetry-core
];
buildInputs = [
nixops
];
pythonImportsCheck = [ "nixos_modules_contrib" ];
passthru.updateScript = unstableGitUpdater {};
meta = with lib; {
description = "Useful NixOS modules which may not belong in the Nixpkgs repository itself";
homepage = "https://github.com/nix-community/nixos-modules-contrib";
license = licenses.lgpl3;
maintainers = [];
};
}

View File

@ -1,114 +0,0 @@
{ pkgs }:
self: super: {
nixops = super.nixops.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/NixOS/nixops.git";
rev = "fc9b55c55da62f949028143b974f67fdc7f40c8b";
sha256 = "0f5r17rq3rf3ylp16cq50prn8qmfc1gwpqgqfj491w38sr5sspf8";
};
}
);
nixops-aws = super.nixops-aws.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/NixOS/nixops-aws.git";
rev = "8802d1cda9004ec1362815292c2a8ab95e6d64e8";
sha256 = "1rf2dxn4gdm9a91jji4f100y62ap3p3svs6qhxf78319phba6hlb";
};
}
);
nixops-digitalocean = super.nixops-digitalocean.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/nix-community/nixops-digitalocean.git";
rev = "e977b7f11e264a6a2bff2dcbc7b94c6a97b92fff";
sha256 = "020fg1kjh3x57dj95micpq6mxjg5j50jy6cs5f10i33ayy3556v8";
};
}
);
nixops-encrypted-links = super.nixops-encrypted-links.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/nix-community/nixops-encrypted-links.git";
rev = "e2f196fce15fcfb00d18c055e1ac53aec33b8fb1";
sha256 = "12ynqwd5ad6wfyv6sma55wnmrlr8i14kd5d42zqv4zl23h0xnd6m";
};
}
);
nixops-gcp = super.nixops-gcp.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/nix-community/nixops-gce.git";
rev = "d13cb794aef763338f544010ceb1816fe31d7f42";
sha256 = "0i57qhiga4nr0ms9gj615l599vxy78lzw7hap4rbzbhl5bl1yijj";
};
}
);
nixops-hercules-ci = super.nixops-hercules-ci.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/hercules-ci/nixops-hercules-ci.git";
rev = "e601d5baffd003fd5f22deeaea0cb96444b054dc";
sha256 = "0rcpv5hc6l9ia8lq8ivwa80b2pwssmdz8an25lhr4i2472mpx1p0";
};
}
);
nixops-hetzner = super.nixops-hetzner.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/NixOS/nixops-hetzner";
rev = "bc7a68070c7371468bcc8bf6e36baebc6bd2da35";
sha256 = "0kmzv5dzh828yh5jwjs5klfslx3lklrqvpvbh29b398m5r9bbqkn";
};
}
);
nixops-hetznercloud = super.nixops-hetznercloud.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/lukebfox/nixops-hetznercloud.git";
rev = "e14f340f7ffe9e2aa7ffbaac0b8a2e3b4cc116b3";
sha256 = "0vhapgzhqfk3y8a26ck09g0ilydsbjlx5g77f8bscdqz818lki12";
};
}
);
nixops-virtd = super.nixops-virtd.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/nix-community/nixops-libvirtd.git";
rev = "be1ea32e02d8abb3dbe1b09b7c5a7419a7412991";
sha256 = "1mklm3lmicvhs0vcib3ss21an45wk24m1mkcwy1zvbpbmvhdz2m4";
};
}
);
nixopsvbox = super.nixopsvbox.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/nix-community/nixops-vbox.git";
rev = "2729672865ebe2aa973c062a3fbddda8c1359da0";
sha256 = "07bmrbg3g2prnba2kwg1rg6rvmnx1vzc538y2q3g04s958hala56";
};
}
);
nixos-modules-contrib = super.nixos-modules-contrib.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "https://github.com/nix-community/nixos-modules-contrib.git";
rev = "81a1c2ef424dcf596a97b2e46a58ca73a1dd1ff8";
sha256 = "0f6ra5r8i1jz8ymw6l3j68b676a1lv0466lv0xa6mi80k6v9457x";
};
}
);
}

View File

@ -1,731 +0,0 @@
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
[[package]]
name = "apache-libcloud"
version = "3.7.0"
description = "A standard Python library that abstracts away differences among multiple cloud provider APIs. For more information and documentation, please see https://libcloud.apache.org"
optional = false
python-versions = ">=3.6, <4"
files = [
{file = "apache-libcloud-3.7.0.tar.gz", hash = "sha256:148a9e50069654432a7d34997954e91434dd38ebf68832eb9c75d442b3e62fad"},
{file = "apache_libcloud-3.7.0-py2.py3-none-any.whl", hash = "sha256:027a9aff2c01db9c8e6f9f94b6eb44b3153d82702c42bfbe7af5624dabf1f950"},
]
[package.dependencies]
requests = ">=2.26.0"
[[package]]
name = "boto"
version = "2.49.0"
description = "Amazon Web Services Library"
optional = false
python-versions = "*"
files = [
{file = "boto-2.49.0-py2.py3-none-any.whl", hash = "sha256:147758d41ae7240dc989f0039f27da8ca0d53734be0eb869ef16e3adcfa462e8"},
{file = "boto-2.49.0.tar.gz", hash = "sha256:ea0d3b40a2d852767be77ca343b58a9e3a4b00d9db440efb8da74b4e58025e5a"},
]
[[package]]
name = "boto3"
version = "1.28.22"
description = "The AWS SDK for Python"
optional = false
python-versions = ">= 3.7"
files = [
{file = "boto3-1.28.22-py3-none-any.whl", hash = "sha256:0c1c1d19232018ac49fd2c0a94aa0b802f5d222e89448ff50734626bce454b32"},
{file = "boto3-1.28.22.tar.gz", hash = "sha256:af1ce129f462cdc8dfb1a1c559d7ed725e51344fb0ae4a56d9453196bf416555"},
]
[package.dependencies]
botocore = ">=1.31.22,<1.32.0"
jmespath = ">=0.7.1,<2.0.0"
s3transfer = ">=0.6.0,<0.7.0"
[package.extras]
crt = ["botocore[crt] (>=1.21.0,<2.0a0)"]
[[package]]
name = "botocore"
version = "1.31.22"
description = "Low-level, data-driven core of boto 3."
optional = false
python-versions = ">= 3.7"
files = [
{file = "botocore-1.31.22-py3-none-any.whl", hash = "sha256:b91025ca1a16b13ae662bdb46e7c16d2c53619df23bf3583a43791519da14870"},
{file = "botocore-1.31.22.tar.gz", hash = "sha256:d193ab0742ddc4af3a3994af4ec993acf5ac75460f298880fe869765e7bc578d"},
]
[package.dependencies]
jmespath = ">=0.7.1,<2.0.0"
python-dateutil = ">=2.1,<3.0.0"
urllib3 = ">=1.25.4,<1.27"
[package.extras]
crt = ["awscrt (==0.16.26)"]
[[package]]
name = "certifi"
version = "2023.7.22"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.6"
files = [
{file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"},
{file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"},
]
[[package]]
name = "cffi"
version = "1.15.1"
description = "Foreign Function Interface for Python calling C code."
optional = false
python-versions = "*"
files = [
{file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"},
{file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"},
{file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"},
{file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"},
{file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"},
{file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"},
{file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"},
{file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"},
{file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"},
{file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"},
{file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"},
{file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"},
{file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"},
{file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"},
{file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"},
{file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"},
{file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"},
{file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"},
{file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"},
{file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"},
{file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"},
{file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"},
{file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"},
{file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"},
{file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"},
{file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"},
{file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"},
{file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"},
{file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"},
{file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"},
{file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"},
{file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"},
{file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"},
{file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"},
{file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"},
{file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"},
{file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"},
{file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"},
{file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"},
{file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"},
{file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"},
{file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"},
{file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"},
{file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"},
{file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"},
{file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"},
{file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"},
{file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"},
{file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"},
{file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"},
{file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"},
{file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"},
{file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"},
{file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"},
{file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"},
{file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"},
{file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"},
{file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"},
{file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"},
{file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"},
{file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"},
{file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"},
{file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"},
{file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"},
]
[package.dependencies]
pycparser = "*"
[[package]]
name = "charset-normalizer"
version = "3.2.0"
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
optional = false
python-versions = ">=3.7.0"
files = [
{file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"},
{file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710"},
{file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed"},
{file = "charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9"},
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623"},
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a"},
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8"},
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad"},
{file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c"},
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3"},
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029"},
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f"},
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a"},
{file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd"},
{file = "charset_normalizer-3.2.0-cp310-cp310-win32.whl", hash = "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96"},
{file = "charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea"},
{file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"},
{file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"},
{file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"},
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"},
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"},
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"},
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"},
{file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"},
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"},
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"},
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"},
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"},
{file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"},
{file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"},
{file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-win32.whl", hash = "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1"},
{file = "charset_normalizer-3.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959"},
{file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669"},
{file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329"},
{file = "charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149"},
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94"},
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f"},
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa"},
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a"},
{file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037"},
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46"},
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2"},
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d"},
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c"},
{file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10"},
{file = "charset_normalizer-3.2.0-cp38-cp38-win32.whl", hash = "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706"},
{file = "charset_normalizer-3.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e"},
{file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c"},
{file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f"},
{file = "charset_normalizer-3.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858"},
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5"},
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952"},
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4"},
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200"},
{file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252"},
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22"},
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c"},
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e"},
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299"},
{file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020"},
{file = "charset_normalizer-3.2.0-cp39-cp39-win32.whl", hash = "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9"},
{file = "charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80"},
{file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"},
]
[[package]]
name = "cryptography"
version = "40.0.1"
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
optional = false
python-versions = ">=3.6"
files = [
{file = "cryptography-40.0.1-cp36-abi3-macosx_10_12_universal2.whl", hash = "sha256:918cb89086c7d98b1b86b9fdb70c712e5a9325ba6f7d7cfb509e784e0cfc6917"},
{file = "cryptography-40.0.1-cp36-abi3-macosx_10_12_x86_64.whl", hash = "sha256:9618a87212cb5200500e304e43691111570e1f10ec3f35569fdfcd17e28fd797"},
{file = "cryptography-40.0.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a4805a4ca729d65570a1b7cac84eac1e431085d40387b7d3bbaa47e39890b88"},
{file = "cryptography-40.0.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63dac2d25c47f12a7b8aa60e528bfb3c51c5a6c5a9f7c86987909c6c79765554"},
{file = "cryptography-40.0.1-cp36-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:0a4e3406cfed6b1f6d6e87ed243363652b2586b2d917b0609ca4f97072994405"},
{file = "cryptography-40.0.1-cp36-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:1e0af458515d5e4028aad75f3bb3fe7a31e46ad920648cd59b64d3da842e4356"},
{file = "cryptography-40.0.1-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:d8aa3609d337ad85e4eb9bb0f8bcf6e4409bfb86e706efa9a027912169e89122"},
{file = "cryptography-40.0.1-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:cf91e428c51ef692b82ce786583e214f58392399cf65c341bc7301d096fa3ba2"},
{file = "cryptography-40.0.1-cp36-abi3-win32.whl", hash = "sha256:650883cc064297ef3676b1db1b7b1df6081794c4ada96fa457253c4cc40f97db"},
{file = "cryptography-40.0.1-cp36-abi3-win_amd64.whl", hash = "sha256:a805a7bce4a77d51696410005b3e85ae2839bad9aa38894afc0aa99d8e0c3160"},
{file = "cryptography-40.0.1-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:cd033d74067d8928ef00a6b1327c8ea0452523967ca4463666eeba65ca350d4c"},
{file = "cryptography-40.0.1-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:d36bbeb99704aabefdca5aee4eba04455d7a27ceabd16f3b3ba9bdcc31da86c4"},
{file = "cryptography-40.0.1-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:32057d3d0ab7d4453778367ca43e99ddb711770477c4f072a51b3ca69602780a"},
{file = "cryptography-40.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:f5d7b79fa56bc29580faafc2ff736ce05ba31feaa9d4735048b0de7d9ceb2b94"},
{file = "cryptography-40.0.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7c872413353c70e0263a9368c4993710070e70ab3e5318d85510cc91cce77e7c"},
{file = "cryptography-40.0.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:28d63d75bf7ae4045b10de5413fb1d6338616e79015999ad9cf6fc538f772d41"},
{file = "cryptography-40.0.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:6f2bbd72f717ce33100e6467572abaedc61f1acb87b8d546001328d7f466b778"},
{file = "cryptography-40.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:cc3a621076d824d75ab1e1e530e66e7e8564e357dd723f2533225d40fe35c60c"},
{file = "cryptography-40.0.1.tar.gz", hash = "sha256:2803f2f8b1e95f614419926c7e6f55d828afc614ca5ed61543877ae668cc3472"},
]
[package.dependencies]
cffi = ">=1.12"
[package.extras]
docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"]
docstest = ["pyenchant (>=1.6.11)", "sphinxcontrib-spelling (>=4.0.1)", "twine (>=1.12.0)"]
pep8test = ["black", "check-manifest", "mypy", "ruff"]
sdist = ["setuptools-rust (>=0.11.4)"]
ssh = ["bcrypt (>=3.1.5)"]
test = ["iso8601", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-shard (>=0.1.2)", "pytest-subtests", "pytest-xdist"]
test-randomorder = ["pytest-randomly"]
tox = ["tox"]
[[package]]
name = "hcloud"
version = "1.18.2"
description = "Official Hetzner Cloud python library"
optional = false
python-versions = ">3.5"
files = [
{file = "hcloud-1.18.2-py2.py3-none-any.whl", hash = "sha256:fcd73c7aab1d6e729333697e5214b26727775eccdbfb50effd1863c3424caa59"},
{file = "hcloud-1.18.2.tar.gz", hash = "sha256:37bd5ba56387e3c491c5babd3e08ab91d5f0390cd5e880e4dfea19e21681bc9e"},
]
[package.dependencies]
python-dateutil = ">=2.7.5"
requests = ">=2.20"
[package.extras]
docs = ["Sphinx (==1.8.1)", "sphinx-rtd-theme (==0.4.2)"]
[[package]]
name = "hetzner"
version = "0.8.3"
description = "High level access to the Hetzner robot"
optional = false
python-versions = "*"
files = [
{file = "hetzner-0.8.3.tar.gz", hash = "sha256:9a43dbbeb4a1f3efc86c5fe1c1d7039aaa635dfdb829506ec3aa34382d3a7114"},
]
[[package]]
name = "idna"
version = "3.4"
description = "Internationalized Domain Names in Applications (IDNA)"
optional = false
python-versions = ">=3.5"
files = [
{file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"},
{file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"},
]
[[package]]
name = "jmespath"
version = "1.0.1"
description = "JSON Matching Expressions"
optional = false
python-versions = ">=3.7"
files = [
{file = "jmespath-1.0.1-py3-none-any.whl", hash = "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980"},
{file = "jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe"},
]
[[package]]
name = "jsonpickle"
version = "3.0.1"
description = "Python library for serializing any arbitrary object graph into JSON"
optional = false
python-versions = ">=3.7"
files = [
{file = "jsonpickle-3.0.1-py2.py3-none-any.whl", hash = "sha256:130d8b293ea0add3845de311aaba55e6d706d0bb17bc123bd2c8baf8a39ac77c"},
{file = "jsonpickle-3.0.1.tar.gz", hash = "sha256:032538804795e73b94ead410800ac387fdb6de98f8882ac957fcd247e3a85200"},
]
[package.extras]
docs = ["jaraco.packaging (>=3.2)", "rst.linker (>=1.9)", "sphinx"]
testing = ["ecdsa", "feedparser", "gmpy2", "numpy", "pandas", "pymongo", "pytest (>=3.5,!=3.7.3)", "pytest-black-multipy", "pytest-checkdocs (>=1.2.3)", "pytest-cov", "pytest-flake8 (>=1.1.1)", "scikit-learn", "sqlalchemy"]
testing-libs = ["simplejson", "ujson"]
[[package]]
name = "libvirt-python"
version = "9.6.0"
description = "The libvirt virtualization API python binding"
optional = false
python-versions = ">=3.6"
files = [
{file = "libvirt-python-9.6.0.tar.gz", hash = "sha256:53422d8e3110139655c3d9c2ff2602b238f8a39b7bf61a92a620119b45550a99"},
]
[[package]]
name = "nixops"
version = "2.0.0"
description = "NixOS cloud provisioning and deployment tool"
optional = false
python-versions = "^3.10"
files = []
develop = false
[package.dependencies]
pluggy = "^1.0.0"
PrettyTable = "^0.7.2"
typeguard = "^2.7.1"
typing-extensions = "^3.7.4"
[package.source]
type = "git"
url = "https://github.com/NixOS/nixops.git"
reference = "master"
resolved_reference = "fc9b55c55da62f949028143b974f67fdc7f40c8b"
[[package]]
name = "nixops-aws"
version = "1.0"
description = "NixOps AWS plugin"
optional = false
python-versions = "^3.7"
files = []
develop = false
[package.dependencies]
boto = "^2.49.0"
boto3 = "^1.13.7"
nixops = {git = "https://github.com/NixOS/nixops.git", rev = "master"}
nixos-modules-contrib = {git = "https://github.com/nix-community/nixos-modules-contrib.git", rev = "master"}
typing-extensions = "^3.7.4"
[package.source]
type = "git"
url = "https://github.com/NixOS/nixops-aws.git"
reference = "HEAD"
resolved_reference = "8802d1cda9004ec1362815292c2a8ab95e6d64e8"
[[package]]
name = "nixops-digitalocean"
version = "2.0"
description = "NixOps plugin for Digital Ocean"
optional = false
python-versions = "^3.7"
files = []
develop = false
[package.dependencies]
nixops = {git = "https://github.com/NixOS/nixops.git"}
python-digitalocean = "^1.15.0"
[package.source]
type = "git"
url = "https://github.com/nix-community/nixops-digitalocean.git"
reference = "HEAD"
resolved_reference = "e977b7f11e264a6a2bff2dcbc7b94c6a97b92fff"
[[package]]
name = "nixops-encrypted-links"
version = "1.0"
description = "Encrypted links support for NixOps"
optional = false
python-versions = "^3.7"
files = []
develop = false
[package.dependencies]
nixops = {git = "https://github.com/NixOS/nixops.git"}
[package.source]
type = "git"
url = "https://github.com/nix-community/nixops-encrypted-links.git"
reference = "HEAD"
resolved_reference = "e2f196fce15fcfb00d18c055e1ac53aec33b8fb1"
[[package]]
name = "nixops-gcp"
version = "1.0"
description = "NixOps backend for Google Cloud Platform"
optional = false
python-versions = "^3.10"
files = []
develop = false
[package.dependencies]
apache-libcloud = "^3.7.0"
cryptography = "40.0.1"
nixops = {git = "https://github.com/NixOS/nixops.git", rev = "master"}
nixos-modules-contrib = {git = "https://github.com/nix-community/nixos-modules-contrib.git", rev = "master"}
[package.source]
type = "git"
url = "https://github.com/nix-community/nixops-gce.git"
reference = "HEAD"
resolved_reference = "d13cb794aef763338f544010ceb1816fe31d7f42"
[[package]]
name = "nixops-hercules-ci"
version = "0.1.0"
description = ""
optional = false
python-versions = "^3.8"
files = []
develop = false
[package.dependencies]
nixops = {git = "https://github.com/NixOS/nixops.git"}
[package.source]
type = "git"
url = "https://github.com/hercules-ci/nixops-hercules-ci.git"
reference = "HEAD"
resolved_reference = "e601d5baffd003fd5f22deeaea0cb96444b054dc"
[[package]]
name = "nixops-hetzner"
version = "1.0"
description = "NixOS deployment tool, but for hetzner"
optional = false
python-versions = "^3.7"
files = []
develop = false
[package.dependencies]
hetzner = "0.8.3"
nixops = {git = "https://github.com/NixOS/nixops.git", rev = "master"}
nixos-modules-contrib = {git = "https://github.com/nix-community/nixos-modules-contrib.git", rev = "master"}
typing-extensions = "^3.7.4"
[package.source]
type = "git"
url = "https://github.com/NixOS/nixops-hetzner"
reference = "HEAD"
resolved_reference = "bc7a68070c7371468bcc8bf6e36baebc6bd2da35"
[[package]]
name = "nixops-hetznercloud"
version = "0.1.3"
description = "NixOps Hetzner Cloud plugin"
optional = false
python-versions = "^3.10"
files = []
develop = false
[package.dependencies]
hcloud = "1.18.2"
nixops = {git = "https://github.com/NixOS/nixops.git", rev = "master"}
typing-extensions = "^3.7.4"
[package.source]
type = "git"
url = "https://github.com/lukebfox/nixops-hetznercloud.git"
reference = "HEAD"
resolved_reference = "e14f340f7ffe9e2aa7ffbaac0b8a2e3b4cc116b3"
[[package]]
name = "nixops-virtd"
version = "1.0"
description = "NixOps plugin for virtd"
optional = false
python-versions = "^3.10"
files = []
develop = false
[package.dependencies]
libvirt-python = "^9.0"
nixops = {git = "https://github.com/NixOS/nixops.git"}
[package.source]
type = "git"
url = "https://github.com/nix-community/nixops-libvirtd.git"
reference = "HEAD"
resolved_reference = "be1ea32e02d8abb3dbe1b09b7c5a7419a7412991"
[[package]]
name = "nixopsvbox"
version = "1.7"
description = "NixOps backend for VirtualBox"
optional = false
python-versions = "^3.7"
files = []
develop = false
[package.dependencies]
nixops = {git = "https://github.com/NixOS/nixops.git", rev = "master"}
[package.source]
type = "git"
url = "https://github.com/nix-community/nixops-vbox.git"
reference = "HEAD"
resolved_reference = "2729672865ebe2aa973c062a3fbddda8c1359da0"
[[package]]
name = "nixos-modules-contrib"
version = "0.1.0"
description = "NixOS modules that don't quite belong in NixOS."
optional = false
python-versions = "^3.7"
files = []
develop = false
[package.dependencies]
nixops = {git = "https://github.com/NixOS/nixops.git", rev = "master"}
[package.source]
type = "git"
url = "https://github.com/nix-community/nixos-modules-contrib.git"
reference = "master"
resolved_reference = "81a1c2ef424dcf596a97b2e46a58ca73a1dd1ff8"
[[package]]
name = "pluggy"
version = "1.2.0"
description = "plugin and hook calling mechanisms for python"
optional = false
python-versions = ">=3.7"
files = [
{file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"},
{file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"},
]
[package.extras]
dev = ["pre-commit", "tox"]
testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "prettytable"
version = "0.7.2"
description = "A simple Python library for easily displaying tabular data in a visually appealing ASCII table format."
optional = false
python-versions = "*"
files = [
{file = "prettytable-0.7.2.tar.bz2", hash = "sha256:853c116513625c738dc3ce1aee148b5b5757a86727e67eff6502c7ca59d43c36"},
{file = "prettytable-0.7.2.tar.gz", hash = "sha256:2d5460dc9db74a32bcc8f9f67de68b2c4f4d2f01fa3bd518764c69156d9cacd9"},
{file = "prettytable-0.7.2.zip", hash = "sha256:a53da3b43d7a5c229b5e3ca2892ef982c46b7923b51e98f0db49956531211c4f"},
]
[[package]]
name = "pycparser"
version = "2.21"
description = "C parser in Python"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
{file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"},
{file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"},
]
[[package]]
name = "python-dateutil"
version = "2.8.2"
description = "Extensions to the standard Python datetime module"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
files = [
{file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"},
{file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"},
]
[package.dependencies]
six = ">=1.5"
[[package]]
name = "python-digitalocean"
version = "1.17.0"
description = "digitalocean.com API to manage Droplets and Images"
optional = false
python-versions = "*"
files = [
{file = "python-digitalocean-1.17.0.tar.gz", hash = "sha256:107854fde1aafa21774e8053cf253b04173613c94531f75d5a039ad770562b24"},
{file = "python_digitalocean-1.17.0-py3-none-any.whl", hash = "sha256:0032168e022e85fca314eb3f8dfaabf82087f2ed40839eb28f1eeeeca5afb1fa"},
]
[package.dependencies]
jsonpickle = "*"
requests = "*"
[[package]]
name = "requests"
version = "2.31.0"
description = "Python HTTP for Humans."
optional = false
python-versions = ">=3.7"
files = [
{file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"},
{file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"},
]
[package.dependencies]
certifi = ">=2017.4.17"
charset-normalizer = ">=2,<4"
idna = ">=2.5,<4"
urllib3 = ">=1.21.1,<3"
[package.extras]
socks = ["PySocks (>=1.5.6,!=1.5.7)"]
use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
[[package]]
name = "s3transfer"
version = "0.6.1"
description = "An Amazon S3 Transfer Manager"
optional = false
python-versions = ">= 3.7"
files = [
{file = "s3transfer-0.6.1-py3-none-any.whl", hash = "sha256:3c0da2d074bf35d6870ef157158641178a4204a6e689e82546083e31e0311346"},
{file = "s3transfer-0.6.1.tar.gz", hash = "sha256:640bb492711f4c0c0905e1f62b6aaeb771881935ad27884852411f8e9cacbca9"},
]
[package.dependencies]
botocore = ">=1.12.36,<2.0a.0"
[package.extras]
crt = ["botocore[crt] (>=1.20.29,<2.0a.0)"]
[[package]]
name = "six"
version = "1.16.0"
description = "Python 2 and 3 compatibility utilities"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
files = [
{file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
{file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
]
[[package]]
name = "typeguard"
version = "2.13.3"
description = "Run-time type checker for Python"
optional = false
python-versions = ">=3.5.3"
files = [
{file = "typeguard-2.13.3-py3-none-any.whl", hash = "sha256:5e3e3be01e887e7eafae5af63d1f36c849aaa94e3a0112097312aabfa16284f1"},
{file = "typeguard-2.13.3.tar.gz", hash = "sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4"},
]
[package.extras]
doc = ["sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"]
test = ["mypy", "pytest", "typing-extensions"]
[[package]]
name = "typing-extensions"
version = "3.10.0.2"
description = "Backported and Experimental Type Hints for Python 3.5+"
optional = false
python-versions = "*"
files = [
{file = "typing_extensions-3.10.0.2-py2-none-any.whl", hash = "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7"},
{file = "typing_extensions-3.10.0.2-py3-none-any.whl", hash = "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34"},
{file = "typing_extensions-3.10.0.2.tar.gz", hash = "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"},
]
[[package]]
name = "urllib3"
version = "1.26.16"
description = "HTTP library with thread-safe connection pooling, file post, and more."
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
files = [
{file = "urllib3-1.26.16-py2.py3-none-any.whl", hash = "sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f"},
{file = "urllib3-1.26.16.tar.gz", hash = "sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14"},
]
[package.extras]
brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"]
secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"]
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "3d42a61f93a1a6b6816e317a78f3385271bd838430200f69154ebc5bebeb6162"

View File

@ -1,28 +0,0 @@
[tool.poetry]
name = "nixopsenv"
version = "2.0.0"
description = "NixOps 2.0"
authors = ["Adam Hoese <adam.hose@tweag.io>"]
[tool.poetry.dependencies]
python = "^3.10"
nixops = {git = "https://github.com/NixOS/nixops.git"}
nixops-aws = {git = "https://github.com/NixOS/nixops-aws.git"}
nixops-digitalocean = {git = "https://github.com/nix-community/nixops-digitalocean.git"}
nixops-encrypted-links = {git = "https://github.com/nix-community/nixops-encrypted-links.git"}
nixops-gcp = {git = "https://github.com/nix-community/nixops-gce.git"}
nixops-hercules-ci = {git = "https://github.com/hercules-ci/nixops-hercules-ci.git"}
nixops-hetzner = {git = "https://github.com/NixOS/nixops-hetzner"}
nixops-hetznercloud = {git = "https://github.com/lukebfox/nixops-hetznercloud.git"}
nixopsvbox = {git = "https://github.com/nix-community/nixops-vbox.git"}
nixops-virtd = {git = "https://github.com/nix-community/nixops-libvirtd.git"}
# poetry lock would download an excessive number of wheels looking for a compatible version, so
# we pin a feasible range here. This does not represent a real constraint on the version and
# would be ok to remove/update/ignore in future upgrades. Note that a botocore wheel is about 50MB.
boto3 = "^1.26"
botocore = "^1.29"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

View File

@ -1,11 +0,0 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
packages = [
pkgs.python310
pkgs.poetry2nix.cli
pkgs.pkg-config
pkgs.libvirt
pkgs.poetry
];
}

View File

@ -0,0 +1,65 @@
{ lib
, buildPythonApplication
, fetchFromGitHub
, unstableGitUpdater
, poetry-core
, sphinx
, pluggy
, prettytable
, typeguard
, typing-extensions
, nixosTests
}:
buildPythonApplication rec {
pname = "nixops";
version = "unstable-2023-10-26";
pyproject = true;
src = fetchFromGitHub {
owner = "NixOS";
repo = "nixops";
rev = "2cfc2cb4fa9ecb89a4274574ff7f63ea61782498";
hash = "sha256-4uvQQkERZFEeRJjMAcyLYJzNvH0rNiiJ+5BDQmD58gI=";
};
postPatch = ''
substituteInPlace nixops/args.py --replace "@version@" "${version}-pre-${lib.substring 0 7 src.rev or "dirty"}"
'';
nativeBuildInputs = [
poetry-core
sphinx
];
propagatedBuildInputs = [
pluggy
prettytable
typeguard
typing-extensions
];
postInstall = ''
doc_cache=$(mktemp -d)
sphinx-build -b man -d $doc_cache doc/ $out/share/man/man1
html=$(mktemp -d)
sphinx-build -b html -d $doc_cache doc/ $out/share/nixops/doc
'';
pythonImportsCheck = [ "nixops" ];
passthru = {
tests.nixops = nixosTests.nixops.unstable;
updateScript = unstableGitUpdater {};
};
meta = with lib; {
description = "A tool for deploying to NixOS machines in a network or cloud";
homepage = "https://github.com/NixOS/nixops";
license = licenses.lgpl3Only;
maintainers = with lib.maintainers; [ adisbladis aminechikhaoui roberth ];
platforms = lib.platforms.unix;
mainProgram = "nixops";
};
}

View File

@ -1,11 +0,0 @@
#!/usr/bin/env nix-shell
#! nix-shell -I nixpkgs=../../../../../. -i bash
set -eux
rm -f ./poetry.lock ./poetry-git-overlay.nix
poetry lock
# builtins.fetchGit is disabled in restricted eval
# Pin fixed-output derivations from lock file
poetry2nix lock

View File

@ -25,16 +25,18 @@
stdenv.mkDerivation rec {
pname = "freedv";
version = "1.9.3";
version = "1.9.4";
src = fetchFromGitHub {
owner = "drowe67";
repo = "freedv-gui";
rev = "v${version}";
hash = "sha256-tlkD8Kem4HPwrk3E98UKcPoBNoFucqarEBo+oihnQSU=";
hash = "sha256-3SQ3a1gg4/cXy8BJXazTgh6nkS/KQpM0fCA6JcbHOPc=";
};
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace CMakeLists.txt \
--replace "-Wl,-ld_classic" ""
substituteInPlace src/CMakeLists.txt \
--replace "\''${CMAKE_SOURCE_DIR}/macdylibbundler/dylibbundler" "dylibbundler"
sed -i "/hdiutil/d" src/CMakeLists.txt

View File

@ -30,13 +30,13 @@ let
jsonConfig = (formats.json {}).generate "jsonConfig" config;
in
runCommand name {
nativeBuildInputs = [ cacert ] ++ (if (backend == "transmission" ) then [ transmission_noSystemd ] else if (backend == "rqbit") then [ rqbit ] else throw "rqbit or transmission are the only available backends for fetchbittorrent");
nativeBuildInputs = [ cacert ] ++ (if (backend == "transmission" ) then [ transmission_noSystemd ] else if (backend == "rqbit") then [ rqbit ] else throw "rqbit or transmission are the only available backends for fetchtorrent");
outputHashAlgo = if hash != "" then null else "sha256";
outputHash = hash;
outputHashMode = if recursiveHash then "recursive" else "flat";
# url will be written to the derivation, meaning it can be parsed and utilized
# by external tools, such as tools that may want to seed fetchBittorrent calls
# by external tools, such as tools that may want to seed fetchtorrent calls
# in nixpkgs
inherit url;
}

View File

@ -1,22 +1,22 @@
{ testers, fetchFromBittorrent, ... }:
{ testers, fetchtorrent, ... }:
{
http-link = testers.invalidateFetcherByDrvHash fetchFromBittorrent {
http-link = testers.invalidateFetcherByDrvHash fetchtorrent {
url = "https://webtorrent.io/torrents/wired-cd.torrent";
hash = "sha256-OCsC22WuanqoN6lPv5wDT5ZxPcEHDpZ1EgXGvz1SDYo=";
backend = "transmission";
};
magnet-link = testers.invalidateFetcherByDrvHash fetchFromBittorrent {
magnet-link = testers.invalidateFetcherByDrvHash fetchtorrent {
url = "magnet:?xt=urn:btih:a88fda5954e89178c372716a6a78b8180ed4dad3&dn=The+WIRED+CD+-+Rip.+Sample.+Mash.+Share&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fwired-cd.torrent";
hash = "sha256-OCsC22WuanqoN6lPv5wDT5ZxPcEHDpZ1EgXGvz1SDYo=";
backend = "transmission";
};
http-link-rqbit = testers.invalidateFetcherByDrvHash fetchFromBittorrent {
http-link-rqbit = testers.invalidateFetcherByDrvHash fetchtorrent {
url = "https://webtorrent.io/torrents/wired-cd.torrent";
hash = "sha256-OCsC22WuanqoN6lPv5wDT5ZxPcEHDpZ1EgXGvz1SDYo=";
backend = "rqbit";
};
magnet-link-rqbit = testers.invalidateFetcherByDrvHash fetchFromBittorrent {
magnet-link-rqbit = testers.invalidateFetcherByDrvHash fetchtorrent {
url = "magnet:?xt=urn:btih:a88fda5954e89178c372716a6a78b8180ed4dad3&dn=The+WIRED+CD+-+Rip.+Sample.+Mash.+Share&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fwired-cd.torrent";
hash = "sha256-OCsC22WuanqoN6lPv5wDT5ZxPcEHDpZ1EgXGvz1SDYo=";
backend = "rqbit";

View File

@ -0,0 +1,33 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, qt6
}:
stdenv.mkDerivation rec {
pname = "KDSingleApplication";
version = "1.0.0";
src = fetchFromGitHub {
owner = "KDAB";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-5YprRbfiFI2UGMJqDf+3VDwXV904USEpMEpoNm0g7KY=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ qt6.qtbase ];
cmakeFlags = [ "-DKDSingleApplication_QT6=true" ];
dontWrapQtApps = true;
meta = with lib; {
description = "KDAB's helper class for single-instance policy applications";
homepage = "https://www.kdab.com/";
maintainers = with maintainers; [ hellwolf ];
platforms = platforms.unix;
license = licenses.mit;
changelog = "https://github.com/KDAB/KDSingleApplication/releases/tag/v${version}";
};
}

View File

@ -2,8 +2,7 @@
, stdenv
, fetchFromGitHub
, cmake
, qtbase
, wrapQtAppsHook
, qt6
}:
stdenv.mkDerivation rec {
@ -19,15 +18,14 @@ stdenv.mkDerivation rec {
sourceRoot = "${src.name}/client";
nativeBuildInputs = [ cmake wrapQtAppsHook ];
buildInputs = [ qtbase ];
cmakeFlags = [ ];
nativeBuildInputs = [ cmake ];
buildInputs = [ qt6.qtbase ];
dontWrapQtApps = true;
meta = with lib; {
description = "C++ Qt API for Libre Graph, a free API for cloud collaboration inspired by the MS Graph API";
homepage = "https://owncloud.org";
maintainers = with maintainers; [ qknight hellwolf ];
maintainers = with maintainers; [ hellwolf ];
platforms = platforms.unix;
license = licenses.asl20;
changelog = "https://github.com/owncloud/libre-graph-api-cpp-qt-client/releases/tag/v${version}";

View File

@ -0,0 +1,38 @@
{ lib, stdenv
, rustPlatform
, fetchCrate
, libiconv
, openssl
, pkg-config
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "nix-health";
version = "0.2.3";
src = fetchCrate {
inherit version;
pname = "nix_health";
hash = "sha256-WdzzEFk9VPld6AFTNRsaQbMymw1+mNn/TViGO/Qv0so=";
};
cargoHash = "sha256-xmuosy9T/52D90uXMQAIxtaYDOlCekNCtzpu/3GyQXE=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libiconv openssl ]
# Use a newer SDK for CoreFoundation, because the sysinfo crate requires
# it, https://github.com/GuillaumeGomez/sysinfo/issues/915
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks;
[ IOKit
CoreFoundation
]);
meta = with lib; {
description = "Check the health of your Nix setup";
homepage = "https://zero-to-flakes.com/health/";
license = licenses.asl20;
maintainers = with maintainers; [ srid ];
mainProgram = "nix-health";
};
}

View File

@ -1,38 +1,49 @@
{ lib
, stdenv
, fetchFromGitHub
, mkDerivation
, pkg-config
, cmake
, extra-cmake-modules
, callPackage
, qtbase
, qtkeychain
, wrapQtAppsHook
, qttools
, qt6
, qt6Packages
, sqlite
, libsecret
, libre-graph-api-cpp-qt-client
, kdsingleapplication
# darwin only:
, libinotify-kqueue
, sparkleshare
}:
stdenv.mkDerivation rec {
pname = "owncloud-client";
version = "4.2.0";
libregraph = callPackage ./libre-graph-api-cpp-qt-client.nix { };
version = "5.0.0";
src = fetchFromGitHub {
owner = "owncloud";
repo = "client";
rev = "refs/tags/v${version}";
hash = "sha256-dPNVp5DxCI4ye8eFjHoLGDlf8Ap682o1UB0k2VNr2rs=";
hash = "sha256-SSMNmWrCT1sGa38oY8P84QNedNkQPcIRWrV9B65B5X8=";
};
nativeBuildInputs = [ pkg-config cmake extra-cmake-modules wrapQtAppsHook qttools ];
buildInputs = [ qtbase qtkeychain sqlite libsecret libregraph ];
nativeBuildInputs = [
pkg-config
cmake
extra-cmake-modules
qt6.qttools
qt6.wrapQtAppsHook
];
cmakeFlags = [
"-UCMAKE_INSTALL_LIBDIR"
"-DNO_SHIBBOLETH=1"
buildInputs = [
sqlite
libsecret
qt6.qtbase
qt6.qtsvg # Needed for the systray icon
qt6Packages.qtkeychain
libre-graph-api-cpp-qt-client
kdsingleapplication
] ++ lib.optionals stdenv.isDarwin [
libinotify-kqueue sparkleshare
];
meta = with lib; {
@ -40,7 +51,6 @@ stdenv.mkDerivation rec {
homepage = "https://owncloud.org";
maintainers = with maintainers; [ qknight hellwolf ];
platforms = platforms.unix;
broken = stdenv.isDarwin;
license = licenses.gpl2Plus;
changelog = "https://github.com/owncloud/client/releases/tag/v${version}";
};

View File

@ -23,7 +23,7 @@
buildPythonPackage rec {
pname = "aesara";
version = "2.9.2";
version = "2.9.3";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -32,7 +32,7 @@ buildPythonPackage rec {
owner = "aesara-devs";
repo = "aesara";
rev = "refs/tags/rel-${version}";
hash = "sha256-6SZHr81OiqzKh977RrJtrDvFlAIjguK+1imP3bjxhS8=";
hash = "sha256-aO0+O7Ts9phsV4ghunNolxfAruGBbC+tHjVkmFedcCI=";
};
nativeBuildInputs = [

View File

@ -18,9 +18,7 @@
, aiodns
, brotli
, faust-cchardet
, asynctest
, typing-extensions
, idna-ssl
# tests_require
, async-generator
, freezegun
@ -73,11 +71,6 @@ buildPythonPackage rec {
aiodns
brotli
faust-cchardet
] ++ lib.optionals (pythonOlder "3.8") [
asynctest
typing-extensions
] ++ lib.optionals (pythonOlder "3.7") [
idna-ssl
];
# NOTE: pytest-xdist cannot be added because it is flaky. See https://github.com/NixOS/nixpkgs/issues/230597 for more info.

View File

@ -1,37 +0,0 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, asynctest
, pythonOlder
}:
buildPythonPackage rec {
pname = "aionotify";
version = "0.2.0";
src = fetchFromGitHub {
owner = "rbarrois";
repo = "aionotify";
rev = "v${version}";
sha256 = "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y";
};
disabled = pythonOlder "3.5";
preCheck = ''
substituteInPlace tests/test_usage.py \
--replace "asyncio.wait_for(task, timeout, loop=self.loop)" "asyncio.wait_for(task, timeout)"
'';
nativeCheckInputs = [
asynctest
];
meta = with lib; {
homepage = "https://github.com/rbarrois/aionotify";
description = "Simple, asyncio-based inotify library for Python";
license = with lib.licenses; [ bsd2 ];
platforms = platforms.linux;
maintainers = with lib.maintainers; [ ];
};
}

View File

@ -11,14 +11,14 @@
buildPythonPackage rec {
pname = "awkward-cpp";
version = "24";
version = "25";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-KJE/zw9+5NaZNXQsED+kIu1R+Ng7ZOywy+mebmY/SwY=";
hash = "sha256-Fhq6XUt5CYz/l+Lf9WcCnt9rs3byMQIQs7hFexr2tjM=";
};
nativeBuildInputs = [

View File

@ -40,6 +40,9 @@ buildPythonPackage rec {
cd digitalocean
'';
# Test tries to access the network
disabledTests = ["TestFirewall"];
pythonImportsCheck = [ "digitalocean" ];
meta = with lib; {

View File

@ -1,51 +1,50 @@
{ lib
, aenum
, aiohttp
, asynctest
, buildPythonPackage
, fetchFromGitHub
, httpx
, poetry-core
, pydantic
, pytest-mock
, pytest-asyncio
, pytest-httpx
, pytestCheckHook
, pythonOlder
, requests
, rich
}:
buildPythonPackage rec {
pname = "intellifire4py";
version = "2.2.2";
format = "setuptools";
version = "3.1.29";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "jeeftor";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-iqlKfpnETLqQwy5sNcK2x/TgmuN2hCfYoHEFK2WWVXI=";
rev = "refs/tags/v${version}";
hash = "sha256-isAVq45UnKB8uMg7bhehpxIk5OOLcWx+VNZhJ8dE52Y=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aenum
aiohttp
httpx
pydantic
requests
];
nativeCheckInputs = [
asynctest
pytest-mock
pytestCheckHook
];
disabledTests = [
# Test file is missing
"test_json_files"
rich
];
pythonImportsCheck = [
"intellifire4py"
];
nativeCheckInputs = [
pytest-asyncio
pytest-httpx
pytestCheckHook
];
meta = with lib; {
description = "Module to read Intellifire fireplace status data";

View File

@ -9,7 +9,7 @@
buildPythonPackage rec {
pname = "pyeconet";
version = "0.1.21";
version = "0.1.22";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -18,7 +18,7 @@ buildPythonPackage rec {
owner = "w1ll1am23";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-G+J61L9i5JIgPC4oZQavafjD81kue02r+GRdIazrzOw=";
hash = "sha256-R6PA/i35vo253J4yowe2fPRZEqStAqmm98k81KDHLQk=";
};
nativeBuildInputs = [

View File

@ -26,6 +26,8 @@ buildPythonPackage rec {
aiohttp
];
doCheck = pythonOlder "3.11"; # asynctest is unsupported on python3.11
nativeCheckInputs = [
asynctest
pytest-asyncio

View File

@ -21,7 +21,7 @@
buildPythonPackage rec {
pname = "python-rtmidi";
version = "1.5.6";
version = "1.5.7";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -29,7 +29,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "python_rtmidi";
inherit version;
hash = "sha256-sqCjmbtKXhpWR3eYr9QdAioYtelU9tD/krRbuZvuNxA=";
hash = "sha256-3vsaSyrob/OYwjLFPu2lVOJKSfZ96ELnnOuos8p3N00=";
};
nativeBuildInputs = [

View File

@ -26,6 +26,8 @@ buildPythonPackage rec {
aiohttp
];
doCheck = pythonOlder "3.11"; # asynctest unsupported on python3.11
nativeCheckInputs = [
asynctest
pytest-asyncio

View File

@ -30,7 +30,7 @@
buildPythonPackage rec {
pname = "reptor";
version = "0.5";
version = "0.7";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -39,7 +39,7 @@ buildPythonPackage rec {
owner = "Syslifters";
repo = "reptor";
rev = "refs/tags/${version}";
hash = "sha256-TN4ti860bMegxsCMhSxVQwiTLCB9nl+CJ+xDzJQcRuE=";
hash = "sha256-d76Hsf+leJKYOh7k/RVuo6adfjMW6yAYt+vh7KNh7sA=";
};
nativeBuildInputs = [

View File

@ -11,7 +11,7 @@
buildPythonPackage rec {
pname = "sqlobject";
version = "3.10.2";
version = "3.10.3";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -19,7 +19,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "SQLObject";
inherit version;
hash = "sha256-dW9IsIdOSnCG3thWhYwIsz0Oa5runnXD84S5ITPH3ww=";
hash = "sha256-pbXO+gXgKD2ycuG6RirEnQnGmBJpUkorptBrS4b8FS4=";
};
propagatedBuildInputs = [

View File

@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "types-awscrt";
version = "0.19.3";
version = "0.19.6";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -15,7 +15,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "types_awscrt";
inherit version;
hash = "sha256-miHKrEKHwRPdUmZXB3hcRbsdMkK3oriutXxJ6edJozA=";
hash = "sha256-GdSGfysTK7NPLdruHz/rp8xCqGivXgVcxqWAtC+heTM=";
};
nativeBuildInputs = [

View File

@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "velbus-aio";
version = "2023.10.1";
version = "2023.10.2";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -19,7 +19,7 @@ buildPythonPackage rec {
owner = "Cereal2nd";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-v2B+tDqvQTm+K+cvTRM8LnfaFp5CTsI8/B5clBDNE08=";
hash = "sha256-qRKVjiRrRg1YwwYCSp6KGvaS7QnYLIW5rum3X7vEANM=";
fetchSubmodules = true;
};

View File

@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "xknxproject";
version = "3.3.0";
version = "3.4.0";
format = "pyproject";
disabled = pythonOlder "3.9";
@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "XKNX";
repo = "xknxproject";
rev = "refs/tags/${version}";
hash = "sha256-RH5RQHLpfrI9fRg6OfPZ7/BPHQuHCrkJlwW/EJitdPo=";
hash = "sha256-YHHiA0AKyqOYQHeNJqInxjjn4L64z9Y2mf6otMZVscA=";
};
nativeBuildInputs = [

View File

@ -32,6 +32,8 @@ buildPythonPackage rec {
zigpy
];
doCheck = pythonOlder "3.11"; # asynctest is unsupported on python3.11
nativeCheckInputs = [
asynctest
pytest-asyncio

View File

@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "zwave-js-server-python";
version = "0.52.1";
version = "0.53.1";
format = "setuptools";
disabled = pythonOlder "3.11";
@ -19,7 +19,7 @@ buildPythonPackage rec {
owner = "home-assistant-libs";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-+zGLWti99mYTyPkSxiYgE5RqVvEr2PGt8vFwesjcquo=";
hash = "sha256-WfKZraF/mh1YTgK2YXnP5JHqjj5oWI9PeZAvt75btr8=";
};
propagatedBuildInputs = [

View File

@ -1,6 +0,0 @@
Dont change these files here, they are maintained at https://github.com/nix-community/poetry2nix
The update procedure is as-follows:
1. Send your change to the upstream poetry2nix repository
2. Get it approved with tests passing
3. Run the update script in pkgs/development/tools/poetry2nix

View File

@ -1,157 +0,0 @@
#!/usr/bin/env python
from concurrent.futures import ThreadPoolExecutor
import subprocess
import textwrap
import argparse
import toml
import json
import sys
from typing import Dict, Any, Tuple, List
class Package:
def __init__(self, attrs: Dict[str, Any]) -> None:
self.attrs = attrs
self.name = attrs["name"]
self.source = self.attrs["source"]
def fetch(self) -> Tuple["Package", subprocess.CompletedProcess]:
raise NotImplementedError()
def expression(self, output: str) -> str:
raise NotImplementedError()
class UrlPackage(Package):
def fetch(self) -> Tuple[Package, subprocess.CompletedProcess]:
return (
self,
subprocess.run(
[
"nix-prefetch-url",
"--unpack",
self.source["url"],
],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True
),
)
def expression(self, output: str) -> str:
sha256 = output.rstrip()
return textwrap.dedent("""
%s = super.%s.overridePythonAttrs (
_: {
src = pkgs.fetchzip {
url = "%s";
sha256 = "%s";
};
}
);""" % (self.name, self.name, self.source["url"], sha256))
class GitPackage(Package):
def fetch(self) -> Tuple[Package, subprocess.CompletedProcess]:
reference = self.source.get("resolved_reference", self.source["reference"])
return (
self,
subprocess.run(
[
"nix-prefetch-git",
"--fetch-submodules",
"--url",
self.source["url"],
"--rev",
reference,
],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True
),
)
def expression(self, output: str) -> str:
meta = json.loads(output)
return textwrap.dedent("""
%s = super.%s.overridePythonAttrs (
_: {
src = pkgs.fetchgit {
url = "%s";
rev = "%s";
sha256 = "%s";
};
}
);""" % (self.name, self.name, meta["url"], meta["rev"], meta["sha256"]))
def parse_args() -> argparse.Namespace:
argparser = argparse.ArgumentParser(description="Poetry2nix CLI")
subparsers = argparser.add_subparsers(dest="subcommand")
subparsers.required = True
parser_lock = subparsers.add_parser("lock", help="Generate overrides for git hashes",)
parser_lock.add_argument(
"--lock", default="poetry.lock", help="Path to input poetry.lock",
)
parser_lock.add_argument(
"--out", default="poetry-git-overlay.nix", help="Output file",
)
return argparser.parse_args()
def indent(expr: str, spaces: int = 2) -> str:
i = " " * spaces
return "\n".join([(i if l != "" else "") + l for l in expr.split("\n")])
def main() -> None:
args = parse_args()
with open(args.lock) as lockf:
lock = toml.load(lockf)
pkgs: List[Package] = []
for pkg in lock["package"]:
if "source" in pkg:
source_type = pkg["source"]["type"]
if source_type == "git":
pkgs.append(GitPackage(pkg))
elif source_type == "url":
pkgs.append(UrlPackage(pkg))
with ThreadPoolExecutor() as e:
futures = []
for pkg in pkgs:
futures.append(e.submit(pkg.fetch))
lines = [
"{ pkgs }:",
"self: super: {",
]
for f in futures:
package, p = f.result()
if p.returncode != 0:
sys.stderr.write(p.stderr)
sys.stderr.flush()
exit(p.returncode)
expr = package.expression(p.stdout)
lines.append(indent(expr))
lines.extend(["", "}", ""])
expr = "\n".join(lines)
with open(args.out, "w") as fout:
fout.write(expr)
print(f"Wrote {args.out}")
if __name__ == "__main__":
main()

View File

@ -1,49 +0,0 @@
{ pkgs ? import <nixpkgs> { }
, lib ? pkgs.lib
, version
}:
let
inherit (pkgs) python3;
in
pkgs.stdenv.mkDerivation {
pname = "poetry2nix";
inherit version;
buildInputs = [
(python3.withPackages (ps: [ ps.toml ]))
];
nativeBuildInputs = [
pkgs.makeWrapper
];
src = ./bin;
dontConfigure = true;
buildPhase = ''
runHook preBuild
patchShebangs poetry2nix
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mv poetry2nix $out/bin
wrapProgram $out/bin/poetry2nix --prefix PATH ":" ${lib.makeBinPath [
pkgs.nix-prefetch-git
]}
runHook postInstall
'';
meta = {
homepage = "https://github.com/nix-community/poetry2nix";
description = "CLI to supplement sha256 hashes for git dependencies";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.adisbladis ];
};
}

View File

@ -1,531 +0,0 @@
{ pkgs ? import <nixpkgs> { }
, lib ? pkgs.lib
, poetryLib ? import ./lib.nix { inherit lib pkgs; stdenv = pkgs.stdenv; }
}:
let
# Poetry2nix version
version = "1.42.1";
inherit (poetryLib) isCompatible readTOML normalizePackageName normalizePackageSet;
# Map SPDX identifiers to license names
spdxLicenses = lib.listToAttrs (lib.filter (pair: pair.name != null) (builtins.map (v: { name = if lib.hasAttr "spdxId" v then v.spdxId else null; value = v; }) (lib.attrValues lib.licenses)));
# Get license by id falling back to input string
getLicenseBySpdxId = spdxId: spdxLicenses.${spdxId} or spdxId;
# Experimental withPlugins functionality
toPluginAble = (import ./plugins.nix { inherit pkgs lib; }).toPluginAble;
# List of known build systems that are passed through from nixpkgs unmodified
knownBuildSystems = builtins.fromJSON (builtins.readFile ./known-build-systems.json);
nixpkgsBuildSystems = lib.subtractLists [ "poetry" "poetry-core" ] knownBuildSystems;
mkInputAttrs =
{ py
, pyProject
, attrs
, includeBuildSystem ? true
, groups ? [ ]
, checkGroups ? [ "dev" ]
, extras ? [ "*" ] # * means all extras, otherwise include the dependencies for a given extra
}:
let
getInputs = attr: attrs.${attr} or [ ];
# Get dependencies and filter out depending on interpreter version
getDeps = depSet:
let
compat = isCompatible (poetryLib.getPythonVersion py);
depAttrs = builtins.map (d: lib.toLower d) (builtins.attrNames depSet);
in
(
builtins.map
(
dep:
let
pkg = py.pkgs."${normalizePackageName dep}";
constraints = depSet.${dep}.python or "";
isCompat = compat constraints;
in
if isCompat then pkg else null
)
depAttrs
);
buildSystemPkgs = poetryLib.getBuildSystemPkgs {
inherit pyProject;
pythonPackages = py.pkgs;
};
mkInput = attr: extraInputs: getInputs attr ++ extraInputs;
rawDeps = pyProject.tool.poetry."dependencies" or { };
rawRequiredDeps = lib.filterAttrs (_: v: !(v.optional or false)) rawDeps;
desiredExtrasDeps = lib.unique
(lib.concatMap (extra: pyProject.tool.poetry.extras.${extra}) extras);
allRawDeps =
if extras == [ "*" ] then
rawDeps
else
rawRequiredDeps // lib.getAttrs desiredExtrasDeps rawDeps;
checkInputs' = getDeps (pyProject.tool.poetry."dev-dependencies" or { }) # <poetry-1.2.0
# >=poetry-1.2.0 dependency groups
++ lib.flatten (map (g: getDeps (pyProject.tool.poetry.group.${g}.dependencies or { })) checkGroups);
in
{
buildInputs = mkInput "buildInputs" (if includeBuildSystem then buildSystemPkgs else [ ]);
propagatedBuildInputs = mkInput "propagatedBuildInputs" (
getDeps allRawDeps ++ (
# >=poetry-1.2.0 dependency groups
if pyProject.tool.poetry.group or { } != { }
then lib.flatten (map (g: getDeps pyProject.tool.poetry.group.${g}.dependencies) groups)
else [ ]
)
);
nativeBuildInputs = mkInput "nativeBuildInputs" [ ];
checkInputs = mkInput "checkInputs" checkInputs';
nativeCheckInputs = mkInput "nativeCheckInputs" checkInputs';
};
in
lib.makeScope pkgs.newScope (self: {
inherit version;
/* Returns a package of editable sources whose changes will be available without needing to restart the
nix-shell.
In editablePackageSources you can pass a mapping from package name to source directory to have
those packages available in the resulting environment, whose source changes are immediately available.
*/
mkPoetryEditablePackage =
{ projectDir ? null
, pyproject ? projectDir + "/pyproject.toml"
, python ? pkgs.python3
, pyProject ? readTOML pyproject
# Example: { my-app = ./src; }
, editablePackageSources
}:
assert editablePackageSources != { };
import ./editable.nix {
inherit pyProject python pkgs lib poetryLib editablePackageSources;
};
/* Returns a package containing scripts defined in tool.poetry.scripts.
*/
mkPoetryScriptsPackage =
{ projectDir ? null
, pyproject ? projectDir + "/pyproject.toml"
, python ? pkgs.python3
, pyProject ? readTOML pyproject
, scripts ? pyProject.tool.poetry.scripts
}:
assert scripts != { };
import ./shell-scripts.nix {
inherit lib python scripts;
};
/*
Returns an attrset { python, poetryPackages, pyProject, poetryLock } for the given pyproject/lockfile.
*/
mkPoetryPackages =
{ projectDir ? null
, pyproject ? projectDir + "/pyproject.toml"
, poetrylock ? projectDir + "/poetry.lock"
, poetrylockPos ? { file = toString poetrylock; line = 0; column = 0; }
, overrides ? self.defaultPoetryOverrides
, python ? pkgs.python3
, pwd ? projectDir
, preferWheels ? false
# Example: { my-app = ./src; }
, editablePackageSources ? { }
, pyProject ? readTOML pyproject
, groups ? [ ]
, checkGroups ? [ "dev" ]
, extras ? [ "*" ]
}:
let
/* The default list of poetry2nix override overlays */
mkEvalPep508 = import ./pep508.nix {
inherit lib poetryLib;
inherit (python) stdenv;
};
getFunctorFn = fn: if builtins.typeOf fn == "set" then fn.__functor else fn;
poetryPkg = pkgs.callPackage ./pkgs/poetry { inherit python; poetry2nix = self; };
scripts = pyProject.tool.poetry.scripts or { };
hasScripts = scripts != { };
scriptsPackage = self.mkPoetryScriptsPackage {
inherit python scripts;
};
editablePackageSources' = lib.filterAttrs (name: path: path != null) editablePackageSources;
hasEditable = editablePackageSources' != { };
editablePackage = self.mkPoetryEditablePackage {
inherit pyProject python;
editablePackageSources = editablePackageSources';
};
poetryLock = readTOML poetrylock;
# Lock file version 1.1 files
lockFiles =
let
lockfiles = lib.getAttrFromPath [ "metadata" "files" ] poetryLock;
in
lib.listToAttrs (lib.mapAttrsToList (n: v: { name = normalizePackageName n; value = v; }) lockfiles);
evalPep508 = mkEvalPep508 python;
# Filter packages by their PEP508 markers & pyproject interpreter version
partitions =
let
supportsPythonVersion = pkgMeta: if pkgMeta ? marker then (evalPep508 pkgMeta.marker) else true && isCompatible (poetryLib.getPythonVersion python) pkgMeta.python-versions;
in
lib.partition supportsPythonVersion poetryLock.package;
compatible = partitions.right;
incompatible = partitions.wrong;
# Create an overridden version of pythonPackages
#
# We need to avoid mixing multiple versions of pythonPackages in the same
# closure as python can only ever have one version of a dependency
baseOverlay = self: super:
let
lockPkgs = builtins.listToAttrs (
builtins.map
(
pkgMeta:
let normalizedName = normalizePackageName pkgMeta.name; in
{
name = normalizedName;
value = self.mkPoetryDep (
pkgMeta // {
inherit pwd preferWheels;
pos = poetrylockPos;
source = pkgMeta.source or null;
# Default to files from lock file version 2.0 and fall back to 1.1
files = pkgMeta.files or lockFiles.${normalizedName};
pythonPackages = self;
sourceSpec = (
(normalizePackageSet pyProject.tool.poetry.dependencies or { }).${normalizedName}
or (normalizePackageSet pyProject.tool.poetry.dev-dependencies or { }).${normalizedName}
or (normalizePackageSet pyProject.tool.poetry.group.dev.dependencies or { }).${normalizedName} # Poetry 1.2.0+
or { }
);
}
);
}
)
(lib.reverseList compatible)
);
buildSystems = builtins.listToAttrs (builtins.map (x: { name = x; value = super.${x}; }) nixpkgsBuildSystems);
in
lockPkgs // buildSystems // {
# Create a dummy null package for the current project in case any dependencies depend on the root project (issue #307)
${pyProject.tool.poetry.name} = null;
};
overlays = builtins.map
getFunctorFn
(
[
# Remove Python packages aliases with non-normalized names to avoid issues with infinite recursion (issue #750).
(self: super: {
# Upstream nixpkgs uses non canonical names
async-generator = super.async-generator or super.async_generator or null;
})
(self: super: lib.attrsets.mapAttrs
(
name: value:
if lib.isDerivation value && self.hasPythonModule value && (normalizePackageName name) != name
then null
else value
)
super)
(
self: super:
{
mkPoetryDep = self.callPackage ./mk-poetry-dep.nix {
inherit lib python poetryLib evalPep508;
};
# # Use poetry-core from the poetry build (pep517/518 build-system)
poetry-core = poetryPkg.passthru.python.pkgs.poetry-core;
poetry = poetryPkg;
__toPluginAble = toPluginAble self;
} // lib.optionalAttrs (! super ? setuptools-scm) {
# The canonical name is setuptools-scm
setuptools-scm = super.setuptools_scm;
}
)
# Fix infinite recursion in a lot of packages because of checkInputs
(self: super: lib.mapAttrs
(name: value: (
if lib.isDerivation value && lib.hasAttr "overridePythonAttrs" value
then value.overridePythonAttrs (_: { doCheck = false; })
else value
))
super)
# Null out any filtered packages, we don't want python.pkgs from nixpkgs
(self: super: builtins.listToAttrs (builtins.map (x: { name = normalizePackageName x.name; value = null; }) incompatible))
# Create poetry2nix layer
baseOverlay
] ++ # User provided overrides
(if builtins.typeOf overrides == "list" then overrides else [ overrides ])
);
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) overlays;
py = python.override { inherit packageOverrides; self = py; };
inputAttrs = mkInputAttrs { inherit py pyProject groups checkGroups extras; attrs = { }; includeBuildSystem = false; };
requiredPythonModules = python.pkgs.requiredPythonModules;
/* Include all the nested dependencies which are required for each package.
This guarantees that using the "poetryPackages" attribute will return
complete list of dependencies for the poetry project to be portable.
*/
storePackages = requiredPythonModules (builtins.foldl' (acc: v: acc ++ v) [ ] (lib.attrValues inputAttrs));
in
{
python = py;
poetryPackages = storePackages
++ lib.optional hasScripts scriptsPackage
++ lib.optional hasEditable editablePackage;
poetryLock = poetryLock;
inherit pyProject;
};
/* Returns a package with a python interpreter and all packages specified in the poetry.lock lock file.
In editablePackageSources you can pass a mapping from package name to source directory to have
those packages available in the resulting environment, whose source changes are immediately available.
Example:
poetry2nix.mkPoetryEnv { poetrylock = ./poetry.lock; python = python3; }
*/
mkPoetryEnv =
{ projectDir ? null
, pyproject ? projectDir + "/pyproject.toml"
, poetrylock ? projectDir + "/poetry.lock"
, overrides ? self.defaultPoetryOverrides
, pwd ? projectDir
, python ? pkgs.python3
, preferWheels ? false
, editablePackageSources ? { }
, extraPackages ? ps: [ ]
, groups ? [ "dev" ]
, checkGroups ? [ "dev" ]
, extras ? [ "*" ]
}:
let
inherit (lib) hasAttr;
pyProject = readTOML pyproject;
# Automatically add dependencies with develop = true as editable packages, but only if path dependencies
getEditableDeps = set: lib.mapAttrs
(name: value: projectDir + "/${value.path}")
(lib.filterAttrs (name: dep: dep.develop or false && hasAttr "path" dep) set);
excludedEditablePackageNames = builtins.filter
(pkg: editablePackageSources."${pkg}" == null)
(builtins.attrNames editablePackageSources);
allEditablePackageSources = (
(getEditableDeps (pyProject.tool.poetry."dependencies" or { }))
// (getEditableDeps (pyProject.tool.poetry."dev-dependencies" or { }))
// (
# Poetry>=1.2.0
if pyProject.tool.poetry.group or { } != { } then
builtins.foldl' (acc: g: acc // getEditableDeps pyProject.tool.poetry.group.${g}.dependencies) { } groups
else { }
)
// editablePackageSources
);
editablePackageSources' = builtins.removeAttrs
allEditablePackageSources
excludedEditablePackageNames;
poetryPython = self.mkPoetryPackages {
inherit pyproject poetrylock overrides python pwd preferWheels pyProject groups checkGroups extras;
editablePackageSources = editablePackageSources';
};
inherit (poetryPython) poetryPackages;
# Don't add editable sources to the environment since they will sometimes fail to build and are not useful in the development env
editableAttrs = lib.attrNames editablePackageSources';
envPkgs = builtins.filter (drv: ! lib.elem (drv.pname or drv.name or "") editableAttrs) poetryPackages;
in
poetryPython.python.withPackages (ps: envPkgs ++ (extraPackages ps));
/* Creates a Python application from pyproject.toml and poetry.lock
The result also contains a .dependencyEnv attribute which is a python
environment of all dependencies and this apps modules. This is useful if
you rely on dependencies to invoke your modules for deployment: e.g. this
allows `gunicorn my-module:app`.
*/
mkPoetryApplication =
{ projectDir ? null
, src ? (
# Assume that a project which is the result of a derivation is already adequately filtered
if lib.isDerivation projectDir then projectDir else self.cleanPythonSources { src = projectDir; }
)
, pyproject ? projectDir + "/pyproject.toml"
, poetrylock ? projectDir + "/poetry.lock"
, overrides ? self.defaultPoetryOverrides
, meta ? { }
, python ? pkgs.python3
, pwd ? projectDir
, preferWheels ? false
, groups ? [ ]
, checkGroups ? [ "dev" ]
, extras ? [ "*" ]
, ...
}@attrs:
let
poetryPython = self.mkPoetryPackages {
inherit pyproject poetrylock overrides python pwd preferWheels groups checkGroups extras;
};
py = poetryPython.python;
hooks = py.pkgs.callPackage ./hooks { };
inherit (poetryPython) pyProject;
specialAttrs = [
"overrides"
"poetrylock"
"projectDir"
"pwd"
"pyproject"
"preferWheels"
];
passedAttrs = builtins.removeAttrs attrs specialAttrs;
inputAttrs = mkInputAttrs { inherit py pyProject attrs groups checkGroups extras; };
app = py.pkgs.buildPythonPackage (
passedAttrs // inputAttrs // {
nativeBuildInputs = inputAttrs.nativeBuildInputs ++ [
hooks.removePathDependenciesHook
hooks.removeGitDependenciesHook
];
} // {
pname = normalizePackageName pyProject.tool.poetry.name;
version = pyProject.tool.poetry.version;
inherit src;
format = "pyproject";
# Like buildPythonApplication, but without the toPythonModule part
# Meaning this ends up looking like an application but it also
# provides python modules
namePrefix = "";
passthru = {
python = py;
dependencyEnv = (
lib.makeOverridable ({ app, ... }@attrs:
let
args = builtins.removeAttrs attrs [ "app" ] // {
extraLibs = [ app ];
};
in
py.buildEnv.override args)
) { inherit app; };
};
# Extract position from explicitly passed attrs so meta.position won't point to poetry2nix internals
pos = builtins.unsafeGetAttrPos (lib.elemAt (lib.attrNames attrs) 0) attrs;
meta = lib.optionalAttrs (lib.hasAttr "description" pyProject.tool.poetry)
{
inherit (pyProject.tool.poetry) description;
} // lib.optionalAttrs (lib.hasAttr "homepage" pyProject.tool.poetry) {
inherit (pyProject.tool.poetry) homepage;
} // {
inherit (py.meta) platforms;
license = getLicenseBySpdxId (pyProject.tool.poetry.license or "unknown");
} // meta;
}
);
in
app;
/* Poetry2nix CLI used to supplement SHA-256 hashes for git dependencies */
cli = import ./cli.nix {
inherit pkgs lib;
inherit (self) version;
};
# inherit mkPoetryEnv mkPoetryApplication mkPoetryPackages;
inherit (poetryLib) cleanPythonSources;
/*
Create a new default set of overrides with the same structure as the built-in ones
*/
mkDefaultPoetryOverrides = defaults: {
__functor = defaults;
extend = overlay:
let
composed = lib.foldr lib.composeExtensions overlay [ defaults ];
in
self.mkDefaultPoetryOverrides composed;
overrideOverlay = fn:
let
overlay = self: super:
let
defaultSet = defaults self super;
customSet = fn self super;
in
defaultSet // customSet;
in
self.mkDefaultPoetryOverrides overlay;
};
/*
The default list of poetry2nix override overlays
Can be overriden by calling defaultPoetryOverrides.overrideOverlay which takes an overlay function
*/
defaultPoetryOverrides = self.mkDefaultPoetryOverrides (import ./overrides { inherit pkgs lib; });
/*
Convenience functions for specifying overlays with or without the poerty2nix default overrides
*/
overrides = {
/*
Returns the specified overlay in a list
*/
withoutDefaults = overlay: [
overlay
];
/*
Returns the specified overlay and returns a list
combining it with poetry2nix default overrides
*/
withDefaults = overlay: [
overlay
self.defaultPoetryOverrides
];
};
})

View File

@ -1,55 +0,0 @@
{ pkgs
, lib
, poetryLib
, pyProject
, python
, editablePackageSources
}:
let
name = poetryLib.normalizePackageName pyProject.tool.poetry.name;
# Just enough standard PKG-INFO fields for an editable installation
pkgInfoFields = {
Metadata-Version = "2.1";
Name = name;
# While the pyproject.toml could contain arbitrary version strings, for
# simplicity we just use the same one for PKG-INFO, even though that
# should follow follow PEP 440: https://www.python.org/dev/peps/pep-0345/#version
# This is how poetry transforms it: https://github.com/python-poetry/poetry/blob/6cd3645d889f47c10425961661b8193b23f0ed79/poetry/version/version.py
Version = pyProject.tool.poetry.version;
Summary = pyProject.tool.poetry.description;
};
pkgInfoFile = builtins.toFile "${name}-PKG-INFO"
(lib.concatStringsSep "\n" (lib.mapAttrsToList (key: value: "${key}: ${value}") pkgInfoFields));
entryPointsFile = builtins.toFile "${name}-entry_points.txt"
(lib.generators.toINI { } pyProject.tool.poetry.plugins);
# A python package that contains simple .egg-info and .pth files for an editable installation
editablePackage = python.pkgs.toPythonModule (pkgs.runCommand "${name}-editable"
{ } ''
mkdir -p "$out/${python.sitePackages}"
cd "$out/${python.sitePackages}"
# See https://docs.python.org/3.8/library/site.html for info on such .pth files
# These add another site package path for each line
touch poetry2nix-editable.pth
${lib.concatMapStringsSep "\n"
(src: ''
echo "${toString src}" >> poetry2nix-editable.pth
'')
(lib.attrValues editablePackageSources)}
# Create a very simple egg so pkg_resources can find this package
# See https://setuptools.readthedocs.io/en/latest/formats.html for more info on the egg format
mkdir "${name}.egg-info"
cd "${name}.egg-info"
ln -s ${pkgInfoFile} PKG-INFO
${lib.optionalString (pyProject.tool.poetry ? plugins) ''
ln -s ${entryPointsFile} entry_points.txt
''}
''
);
in
editablePackage

View File

@ -1,15 +0,0 @@
[
"egg",
"tar",
"tar.bz2",
"tar.gz",
"tar.lz",
"tar.lzma",
"tar.xz",
"tbz",
"tgz",
"tlz",
"txz",
"whl",
"zip"
]

View File

@ -1,24 +0,0 @@
source $stdenv/setup
set -euo pipefail
curl="curl \
--location \
--max-redirs 20 \
--retry 2 \
--disable-epsv \
--cookie-jar cookies \
--insecure \
--speed-time 5 \
--progress-bar \
--fail \
$curlOpts \
$NIX_CURL_FLAGS"
echo "Trying to fetch with predicted URL: $predictedURL"
$curl $predictedURL --output $out && exit 0
echo "Predicted URL '$predictedURL' failed, querying pypi.org"
$curl "https://pypi.org/pypi/$pname/json" | jq -r ".releases.\"$version\"[] | select(.filename == \"$file\") | .url" > url
url=$(cat url)
$curl -k $url --output $out

View File

@ -1,134 +0,0 @@
# Some repositories (such as Devpi) expose the Pypi legacy API
# (https://warehouse.pypa.io/api-reference/legacy.html).
#
# Note it is not possible to use pip
# https://discuss.python.org/t/pip-download-just-the-source-packages-no-building-no-metadata-etc/4651/12
import os
import sys
import netrc
from urllib.parse import urlparse, urlunparse
from html.parser import HTMLParser
import urllib.request
import shutil
import ssl
from os.path import normpath
# Parse the legacy index page to extract the href and package names
class Pep503(HTMLParser):
def __init__(self):
super().__init__()
self.sources = {}
self.url = None
self.name = None
def handle_data(self, data):
if self.url is not None:
self.name = data
def handle_starttag(self, tag, attrs):
if tag == "a":
for name, value in attrs:
if name == "href":
self.url = value
def handle_endtag(self, tag):
if self.url is not None:
self.sources[self.name] = self.url
self.url = None
url = sys.argv[1]
package_name = sys.argv[2]
index_url = url + "/" + package_name + "/"
package_filename = sys.argv[3]
# Parse username and password for this host from the netrc file if given.
username, password = None, None
if os.environ["NETRC"]:
netrc_obj = netrc.netrc(os.environ["NETRC"])
host = urlparse(index_url).netloc
# Strip port number if present
if ":" in host:
host = host.split(":")[0]
username, _, password = netrc_obj.authenticators(host)
print("Reading index %s" % index_url)
context = ssl.create_default_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
# Extract out username/password from index_url, if present.
parsed_url = urlparse(index_url)
username = parsed_url.username or username
password = parsed_url.password or password
index_url = parsed_url._replace(netloc=parsed_url.netloc.rpartition("@")[-1]).geturl()
req = urllib.request.Request(index_url)
if username and password:
import base64
password_b64 = base64.b64encode(":".join((username, password)).encode()).decode(
"utf-8"
)
req.add_header("Authorization", "Basic {}".format(password_b64))
response = urllib.request.urlopen(req, context=context)
index = response.read()
parser = Pep503()
parser.feed(str(index, "utf-8"))
if package_filename not in parser.sources:
print(
"The file %s has not be found in the index %s" % (package_filename, index_url)
)
exit(1)
package_file = open(package_filename, "wb")
# Sometimes the href is a relative or absolute path within the index's domain.
indicated_url = urlparse(parser.sources[package_filename])
if indicated_url.netloc == "":
parsed_url = urlparse(index_url)
if indicated_url.path.startswith("/"):
# An absolute path within the index's domain.
path = parser.sources[package_filename]
else:
# A relative path.
path = parsed_url.path + "/" + parser.sources[package_filename]
package_url = urlunparse(
(
parsed_url.scheme,
parsed_url.netloc,
path,
None,
None,
None,
)
)
else:
package_url = parser.sources[package_filename]
# Handle urls containing "../"
parsed_url = urlparse(package_url)
real_package_url = urlunparse(
(
parsed_url.scheme,
parsed_url.netloc,
normpath(parsed_url.path),
parsed_url.params,
parsed_url.query,
parsed_url.fragment,
)
)
print("Downloading %s" % real_package_url)
req = urllib.request.Request(real_package_url)
if username and password:
req.add_unredirected_header("Authorization", "Basic {}".format(password_b64))
response = urllib.request.urlopen(req, context=context)
with response as r:
shutil.copyfileobj(r, package_file)

View File

@ -1,132 +0,0 @@
{ python
, stdenv
, buildPackages
, makeSetupHook
, wheel
, pip
, pkgs
, lib
}:
let
inherit (python.pythonForBuild.pkgs) callPackage;
pythonInterpreter = python.pythonForBuild.interpreter;
pythonSitePackages = python.sitePackages;
nonOverlayedPython = pkgs.python3.pythonForBuild.withPackages (ps: [ ps.tomlkit ]);
makeRemoveSpecialDependenciesHook = { fields, kind }:
nonOverlayedPython.pkgs.callPackage
(
_:
makeSetupHook
{
name = "remove-path-dependencies.sh";
substitutions = {
# NOTE: We have to use a non-overlayed Python here because otherwise we run into an infinite recursion
# because building of tomlkit and its dependencies also use these hooks.
pythonPath = nonOverlayedPython.pkgs.makePythonPath [ nonOverlayedPython ];
pythonInterpreter = nonOverlayedPython.interpreter;
pyprojectPatchScript = "${./pyproject-without-special-deps.py}";
inherit fields;
inherit kind;
};
} ./remove-special-dependencies.sh
)
{ };
makeSetupHookArgs = deps:
if lib.elem "propagatedBuildInputs" (builtins.attrNames (builtins.functionArgs makeSetupHook)) then
{ propagatedBuildInputs = deps; }
else
{ inherit deps; };
in
{
removePathDependenciesHook = makeRemoveSpecialDependenciesHook {
fields = [ "path" ];
kind = "path";
};
removeGitDependenciesHook = makeRemoveSpecialDependenciesHook {
fields = [ "git" "branch" "rev" "tag" ];
kind = "git";
};
pipBuildHook = callPackage
(
{ pip, wheel }:
makeSetupHook
({
name = "pip-build-hook.sh";
substitutions = {
inherit pythonInterpreter pythonSitePackages;
};
} // (makeSetupHookArgs [ pip wheel ])) ./pip-build-hook.sh
)
{ };
poetry2nixFixupHook = callPackage
(
_:
makeSetupHook
{
name = "fixup-hook.sh";
substitutions = {
inherit pythonSitePackages;
filenames = builtins.concatStringsSep " " [
"pyproject.toml"
"README.md"
"LICENSE"
];
};
} ./fixup-hook.sh
)
{ };
# As of 2023-03 a newer version of packaging introduced a new behaviour where python-requires
# cannot contain version wildcards. This behaviour is complaint with PEP440
#
# The wildcards are a no-op anyway so we can work around this issue by just dropping the precision down to the last known number.
poetry2nixPythonRequiresPatchHook = callPackage
(
_:
let
# Python pre 3.9 does not contain the ast.unparse method.
# We can extract this from Python 3.8 for any
unparser = stdenv.mkDerivation {
name = "${python.name}-astunparse";
inherit (python) src;
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/poetry2nix_astunparse
cp ./Tools/parser/unparse.py $out/poetry2nix_astunparse/__init__.py
'';
};
pythonPath =
[ ]
++ lib.optional (lib.versionOlder python.version "3.9") unparser;
in
makeSetupHook
{
name = "require-python-patch-hook.sh";
substitutions = {
inherit pythonInterpreter pythonPath;
patchScript = ./python-requires-patch-hook.py;
};
} ./python-requires-patch-hook.sh
)
{ };
# When the "wheel" package itself is a wheel the nixpkgs hook (which pulls in "wheel") leads to infinite recursion
# It doesn't _really_ depend on wheel though, it just copies the wheel.
wheelUnpackHook = callPackage
(_:
makeSetupHook
{
name = "wheel-unpack-hook.sh";
} ./wheel-unpack-hook.sh
)
{ };
}

View File

@ -1,20 +0,0 @@
poetry2nix-fixup-hook() {
# Including tests in the output is a common mistake
if [ -z "${dontFixupTests-}" ]; then
rm -rf $out/@pythonSitePackages@/tests
fi
# Including files in site-packages is a common packaging mistake
#
# While we cannot remove all normal files dumped in site-packages
# we can clean up some common mistakes
if [ -z "${dontFixupSitePackages-}" ]; then
for f in @filenames@; do
rm -f $out/@pythonSitePackages@/$f
done
fi
}
postFixupHooks+=(poetry2nix-fixup-hook)

View File

@ -1,42 +0,0 @@
# Setup hook to use for pip projects
echo "Sourcing pip-build-hook"
pipBuildPhase() {
echo "Executing pipBuildPhase"
runHook preBuild
mkdir -p dist
echo "Creating a wheel..."
@pythonInterpreter@ -m pip wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist .
echo "Finished creating a wheel..."
runHook postBuild
echo "Finished executing pipBuildPhase"
}
pipShellHook() {
echo "Executing pipShellHook"
runHook preShellHook
# Long-term setup.py should be dropped.
if [ -e pyproject.toml ]; then
tmp_path=$(mktemp -d)
export PATH="$tmp_path/bin:$PATH"
export PYTHONPATH="$tmp_path/@pythonSitePackages@:$PYTHONPATH"
mkdir -p "$tmp_path/@pythonSitePackages@"
@pythonInterpreter@ -m pip install -e . --prefix "$tmp_path" >&2
fi
runHook postShellHook
echo "Finished executing pipShellHook"
}
if [ -z "${dontUsePipBuild-}" ] && [ -z "${buildPhase-}" ]; then
echo "Using pipBuildPhase"
buildPhase=pipBuildPhase
fi
if [ -z "${shellHook-}" ]; then
echo "Using pipShellHook"
shellHook=pipShellHook
fi

View File

@ -1,54 +0,0 @@
#!/usr/bin/env python
# Patch out special dependencies (git and path) from a pyproject.toml file
import argparse
import sys
import tomlkit
def main(input, output, fields_to_remove):
data = tomlkit.loads(input.read())
try:
deps = data["tool"]["poetry"]["dependencies"]
except KeyError:
pass
else:
for dep in deps.values():
if isinstance(dep, dict):
any_removed = False
for field in fields_to_remove:
any_removed |= dep.pop(field, None) is not None
if any_removed:
dep["version"] = "*"
dep.pop("develop", None)
output.write(tomlkit.dumps(data))
if __name__ == "__main__":
p = argparse.ArgumentParser()
p.add_argument(
"-i",
"--input",
type=argparse.FileType("r"),
default=sys.stdin,
help="Location from which to read input TOML",
)
p.add_argument(
"-o",
"--output",
type=argparse.FileType("w"),
default=sys.stdout,
help="Location to write output TOML",
)
p.add_argument(
"-f",
"--fields-to-remove",
nargs="+",
help="The fields to remove from the dependency's TOML",
)
args = p.parse_args()
main(args.input, args.output, args.fields_to_remove)

View File

@ -1,79 +0,0 @@
#!/usr/bin/env python
import ast
import sys
import io
# Python2 compat
if sys.version_info[0] < 3:
FileNotFoundError = IOError
# Python <= 3.8 compat
def astunparse(tree):
# Use bundled unparse by default
if hasattr(ast, "unparse"):
return ast.unparse(tree)
# Use example tool from Python sources for older interpreter versions
from poetry2nix_astunparse import Unparser
buf = io.StringIO()
up = Unparser(tree, buf)
return buf.getvalue()
class Rewriter(ast.NodeVisitor):
def __init__(self, *args, **kwargs):
super(Rewriter, self).__init__(*args, **kwargs)
self.modified = False
def visit_Call(self, node):
function_name = ""
if isinstance(node.func, ast.Name):
function_name = node.func.id
elif isinstance(node.func, ast.Attribute):
function_name = node.func.attr
else:
return
if function_name != "setup":
return
for kw in node.keywords:
if kw.arg != "python_requires":
continue
value = kw.value
if not isinstance(value, ast.Constant):
return
# Rewrite version constraints without wildcard characters.
#
# Only rewrite the file if the modified value actually differs, as we lose whitespace and comments when rewriting
# with the AST module.
python_requires = ", ".join(
[v.strip().rstrip(".*") for v in value.value.split(",")]
)
if value.value != python_requires:
value.value = python_requires
self.modified = True
if __name__ == "__main__":
sys.path.extend(sys.argv[1:])
try:
with open("setup.py", encoding="utf-8-sig") as f:
tree = ast.parse(f.read())
except FileNotFoundError:
exit(0)
r = Rewriter()
r.visit(tree)
if r.modified:
with open("setup.py", "w") as f:
f.write(astunparse(tree))

View File

@ -1,7 +0,0 @@
poetry2nix-python-requires-patch-hook() {
if [ -z "${dontFixupPythonRequires-}" ]; then
@pythonInterpreter@ @patchScript@ @pythonPath@
fi
}
postPatchHooks+=(poetry2nix-python-requires-patch-hook)

View File

@ -1,23 +0,0 @@
remove-@kind@-dependencies-hook() {
# Tell poetry not to resolve special dependencies. Any version is fine!
if ! test -f pyproject.toml; then
return
fi
echo "Removing @kind@ dependencies"
# NOTE: We have to reset PYTHONPATH to avoid having propagatedBuildInputs
# from the currently building derivation leaking into our unrelated Python
# environment.
PYTHONPATH=@pythonPath@ \
@pythonInterpreter@ \
@pyprojectPatchScript@ \
--fields-to-remove @fields@ < pyproject.toml > pyproject.formatted.toml
mv pyproject.formatted.toml pyproject.toml
echo "Finished removing @kind@ dependencies"
}
postPatchHooks+=(remove-@kind@-dependencies-hook)

View File

@ -1,18 +0,0 @@
# Setup hook to use in case a wheel is fetched
echo "Sourcing wheel setup hook"
wheelUnpackPhase(){
echo "Executing wheelUnpackPhase"
runHook preUnpack
mkdir -p dist
cp "$src" "dist/$(stripHash "$src")"
# runHook postUnpack # Calls find...?
echo "Finished executing wheelUnpackPhase"
}
if [ -z "${dontUseWheelUnpack-}" ] && [ -z "${unpackPhase-}" ]; then
echo "Using wheelUnpackPhase"
unpackPhase=wheelUnpackPhase
fi

View File

@ -1,12 +0,0 @@
[
"poetry",
"poetry-core",
"flit",
"flit-core",
"pbr",
"cython",
"hatchling",
"hatch-vcs",
"setuptools",
"setuptools-scm"
]

View File

@ -1,250 +0,0 @@
{ lib, pkgs, stdenv }:
let
inherit (import ./semver.nix { inherit lib ireplace; }) satisfiesSemver;
inherit (builtins) genList length;
# Replace a list entry at defined index with set value
ireplace = idx: value: list: (
genList (i: if i == idx then value else (builtins.elemAt list i)) (length list)
);
# Normalize package names as per PEP 503
normalizePackageName = name:
let
parts = builtins.split "[-_.]+" name;
partsWithoutSeparator = builtins.filter (x: builtins.typeOf x == "string") parts;
in
lib.strings.toLower (lib.strings.concatStringsSep "-" partsWithoutSeparator);
# Normalize an entire attrset of packages
normalizePackageSet = lib.attrsets.mapAttrs' (name: value: lib.attrsets.nameValuePair (normalizePackageName name) value);
# Get a full semver pythonVersion from a python derivation
getPythonVersion = python:
let
pyVer = lib.splitVersion python.pythonVersion ++ [ "0" ];
ver = lib.splitVersion python.version;
major = l: lib.elemAt l 0;
minor = l: lib.elemAt l 1;
joinVersion = v: lib.concatStringsSep "." v;
in
joinVersion (if major pyVer == major ver && minor pyVer == minor ver then ver else pyVer);
# Compare a semver expression with a version
isCompatible = version:
let
operators = {
"||" = cond1: cond2: cond1 || cond2;
"," = cond1: cond2: cond1 && cond2; # , means &&
"&&" = cond1: cond2: cond1 && cond2;
};
splitRe = "(" + (builtins.concatStringsSep "|" (builtins.map (x: lib.replaceStrings [ "|" ] [ "\\|" ] x) (lib.attrNames operators))) + ")";
in
expr:
let
tokens = builtins.filter (x: x != "") (builtins.split splitRe expr);
combine = acc: v:
let
isOperator = builtins.typeOf v == "list";
operator = if isOperator then (builtins.elemAt v 0) else acc.operator;
in
if isOperator then (acc // { inherit operator; }) else {
inherit operator;
state = operators."${operator}" acc.state (satisfiesSemver version v);
};
initial = { operator = "&&"; state = true; };
in
if expr == "" then true else (builtins.foldl' combine initial tokens).state;
fromTOML = builtins.fromTOML or
(
toml: builtins.fromJSON (
builtins.readFile (
pkgs.runCommand "from-toml"
{
inherit toml;
allowSubstitutes = false;
preferLocalBuild = true;
}
''
${pkgs.remarshal}/bin/remarshal \
-if toml \
-i <(echo "$toml") \
-of json \
-o $out
''
)
)
);
readTOML = path: fromTOML (builtins.readFile path);
#
# Returns the appropriate manylinux dependencies and string representation for the file specified
#
getManyLinuxDeps = f:
let
ml = pkgs.pythonManylinuxPackages;
in
if lib.strings.hasInfix "manylinux1" f then { pkg = [ ml.manylinux1 ]; str = "1"; }
else if lib.strings.hasInfix "manylinux2010" f then { pkg = [ ml.manylinux2010 ]; str = "2010"; }
else if lib.strings.hasInfix "manylinux2014" f then { pkg = [ ml.manylinux2014 ]; str = "2014"; }
else if lib.strings.hasInfix "manylinux_" f then { pkg = [ ml.manylinux2014 ]; str = "pep600"; }
else { pkg = [ ]; str = null; };
# Predict URL from the PyPI index.
# Args:
# pname: package name
# file: filename including extension
# hash: SRI hash
# kind: Language implementation and version tag
predictURLFromPypi = lib.makeOverridable (
{ pname, file, hash, kind }:
"https://files.pythonhosted.org/packages/${kind}/${lib.toLower (builtins.substring 0 1 file)}/${pname}/${file}"
);
# Fetch from the PyPI index.
# At first we try to fetch the predicated URL but if that fails we
# will use the Pypi API to determine the correct URL.
# Args:
# pname: package name
# file: filename including extension
# version: the version string of the dependency
# hash: SRI hash
# kind: Language implementation and version tag
fetchFromPypi = lib.makeOverridable (
{ pname, file, version, hash, kind, curlOpts ? "" }:
let
predictedURL = predictURLFromPypi { inherit pname file hash kind; };
in
(pkgs.stdenvNoCC.mkDerivation {
name = file;
nativeBuildInputs = [
pkgs.buildPackages.curl
pkgs.buildPackages.jq
];
isWheel = lib.strings.hasSuffix "whl" file;
system = "builtin";
preferLocalBuild = true;
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
"NIX_CURL_FLAGS"
];
inherit pname file version curlOpts predictedURL;
builder = ./fetch-from-pypi.sh;
outputHashMode = "flat";
outputHashAlgo = "sha256";
outputHash = hash;
passthru = {
urls = [ predictedURL ]; # retain compatibility with nixpkgs' fetchurl
};
})
);
fetchFromLegacy = lib.makeOverridable (
{ python, pname, url, file, hash }:
let
pathParts =
(builtins.filter
({ prefix, path }: "NETRC" == prefix)
builtins.nixPath);
netrc_file = if (pathParts != [ ]) then (builtins.head pathParts).path else "";
in
pkgs.runCommand file
{
nativeBuildInputs = [ python ];
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
outputHashMode = "flat";
outputHashAlgo = "sha256";
outputHash = hash;
NETRC = netrc_file;
passthru.isWheel = lib.strings.hasSuffix "whl" file;
} ''
python ${./fetch_from_legacy.py} ${url} ${pname} ${file}
mv ${file} $out
''
);
getBuildSystemPkgs =
{ pythonPackages
, pyProject
}:
let
missingBuildBackendError = "No build-system.build-backend section in pyproject.toml. "
+ "Add such a section as described in https://python-poetry.org/docs/pyproject/#poetry-and-pep-517";
requires = lib.attrByPath [ "build-system" "requires" ] (throw missingBuildBackendError) pyProject;
requiredPkgs = builtins.map (n: lib.elemAt (builtins.match "([^!=<>~[]+).*" n) 0) requires;
in
builtins.map (drvAttr: pythonPackages.${drvAttr} or (throw "unsupported build system requirement ${drvAttr}")) requiredPkgs;
# Find gitignore files recursively in parent directory stopping with .git
findGitIgnores = path:
let
parent = path + "/..";
gitIgnore = path + "/.gitignore";
isGitRoot = builtins.pathExists (path + "/.git");
hasGitIgnore = builtins.pathExists gitIgnore;
gitIgnores = if hasGitIgnore then [ gitIgnore ] else [ ];
in
lib.optionals (builtins.pathExists path && builtins.toString path != "/" && ! isGitRoot) (findGitIgnores parent) ++ gitIgnores;
/*
Provides a source filtering mechanism that:
- Filters gitignore's
- Filters pycache/pyc files
- Uses cleanSourceFilter to filter out .git/.hg, .o/.so, editor backup files & nix result symlinks
*/
cleanPythonSources = { src }:
let
gitIgnores = findGitIgnores src;
pycacheFilter = name: type:
(type == "directory" && ! lib.strings.hasInfix "__pycache__" name)
|| (type == "regular" && ! lib.strings.hasSuffix ".pyc" name)
;
in
lib.cleanSourceWith {
filter = lib.cleanSourceFilter;
src = lib.cleanSourceWith {
filter = pkgs.nix-gitignore.gitignoreFilterPure pycacheFilter gitIgnores src;
inherit src;
};
};
# Maps Nixpkgs CPU values to target machines known to be supported for manylinux* wheels.
# (a.k.a. `uname -m` output from CentOS 7)
#
# This is current as of manylinux2014 (PEP-0599), and is a superset of manylinux2010 / manylinux1.
# s390x is not supported in Nixpkgs, so we don't map it.
manyLinuxTargetMachines = {
x86_64 = "x86_64";
i686 = "i686";
aarch64 = "aarch64";
armv7l = "armv7l";
powerpc64 = "ppc64";
powerpc64le = "ppc64le";
};
# Machine tag for our target platform (if available)
getTargetMachine = stdenv: manyLinuxTargetMachines.${stdenv.targetPlatform.parsed.cpu.name} or null;
in
{
inherit
fetchFromPypi
fetchFromLegacy
getManyLinuxDeps
isCompatible
readTOML
getBuildSystemPkgs
satisfiesSemver
cleanPythonSources
normalizePackageName
normalizePackageSet
getPythonVersion
getTargetMachine
;
}

View File

@ -1,220 +0,0 @@
{ autoPatchelfHook
, lib
, python
, buildPythonPackage
, poetryLib
, evalPep508
}:
{ name
, version
, pos ? __curPos
, files
, source
, dependencies ? { }
, pythonPackages
, python-versions
, pwd
, sourceSpec
, supportedExtensions ? lib.importJSON ./extensions.json
, preferWheels ? false
, ...
}:
pythonPackages.callPackage
(
{ preferWheel ? preferWheels
, ...
}@args:
let
inherit (python) stdenv;
inherit (poetryLib) isCompatible getManyLinuxDeps fetchFromLegacy fetchFromPypi normalizePackageName;
inherit (import ./pep425.nix {
inherit lib poetryLib python stdenv;
}) selectWheel
;
fileCandidates =
let
supportedRegex = ("^.*(" + builtins.concatStringsSep "|" supportedExtensions + ")");
matchesVersion = fname: builtins.match ("^.*" + builtins.replaceStrings [ "." "+" ] [ "\\." "\\+" ] version + ".*$") fname != null;
hasSupportedExtension = fname: builtins.match supportedRegex fname != null;
isCompatibleEgg = fname: ! lib.strings.hasSuffix ".egg" fname || lib.strings.hasSuffix "py${python.pythonVersion}.egg" fname;
in
builtins.filter (f: matchesVersion f.file && hasSupportedExtension f.file && isCompatibleEgg f.file) files;
toPath = s: pwd + "/${s}";
isLocked = lib.length fileCandidates > 0;
isSource = source != null;
isGit = isSource && source.type == "git";
isUrl = isSource && source.type == "url";
isWheelUrl = isSource && source.type == "url" && lib.strings.hasSuffix ".whl" source.url;
isDirectory = isSource && source.type == "directory";
isFile = isSource && source.type == "file";
isLegacy = isSource && source.type == "legacy";
localDepPath = toPath source.url;
buildSystemPkgs =
let
pyProjectPath = localDepPath + "/pyproject.toml";
pyProject = poetryLib.readTOML pyProjectPath;
in
if builtins.pathExists pyProjectPath then
poetryLib.getBuildSystemPkgs
{
inherit pythonPackages pyProject;
} else [ ];
pname = normalizePackageName name;
preferWheel' = preferWheel && pname != "wheel";
fileInfo =
let
isBdist = f: lib.strings.hasSuffix "whl" f.file;
isSdist = f: ! isBdist f && ! isEgg f;
isEgg = f: lib.strings.hasSuffix ".egg" f.file;
binaryDist = selectWheel fileCandidates;
sourceDist = builtins.filter isSdist fileCandidates;
eggs = builtins.filter isEgg fileCandidates;
# the `wheel` package cannot be built from a wheel, since that requires the wheel package
# this causes a circular dependency so we special-case ignore its `preferWheel` attribute value
entries = (if preferWheel' then binaryDist ++ sourceDist else sourceDist ++ binaryDist) ++ eggs;
lockFileEntry = (
if lib.length entries > 0 then builtins.head entries
else throw "Missing suitable source/wheel file entry for ${name}"
);
_isEgg = isEgg lockFileEntry;
in
rec {
inherit (lockFileEntry) file hash;
name = file;
format =
if _isEgg then "egg"
else if lib.strings.hasSuffix ".whl" name then "wheel"
else "pyproject";
kind =
if _isEgg then python.pythonVersion
else if format == "pyproject" then "source"
else (builtins.elemAt (lib.strings.splitString "-" name) 2);
};
format = if isWheelUrl then "wheel" else if isDirectory || isGit || isUrl then "pyproject" else fileInfo.format;
hooks = python.pkgs.callPackage ./hooks { };
in
buildPythonPackage {
inherit pname version;
# Circumvent output separation (https://github.com/NixOS/nixpkgs/pull/190487)
format = if format == "pyproject" then "poetry2nix" else format;
doCheck = false; # We never get development deps
# Stripping pre-built wheels lead to `ELF load command address/offset not properly aligned`
dontStrip = format == "wheel";
nativeBuildInputs = [
hooks.poetry2nixFixupHook
]
++ lib.optional (!pythonPackages.isPy27) hooks.poetry2nixPythonRequiresPatchHook
++ lib.optional (isLocked && (getManyLinuxDeps fileInfo.name).str != null) autoPatchelfHook
++ lib.optionals (format == "wheel") [
hooks.wheelUnpackHook
pythonPackages.pipInstallHook
pythonPackages.setuptools
]
++ lib.optionals (format == "pyproject") [
hooks.removePathDependenciesHook
hooks.removeGitDependenciesHook
hooks.pipBuildHook
];
buildInputs = (
lib.optional (isLocked) (getManyLinuxDeps fileInfo.name).pkg
++ lib.optional isDirectory buildSystemPkgs
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) pythonPackages.setuptools
);
propagatedBuildInputs =
let
compat = isCompatible (poetryLib.getPythonVersion python);
deps = lib.filterAttrs
(n: v: v)
(
lib.mapAttrs
(
n: v:
let
constraints = v.python or "";
pep508Markers = v.markers or "";
in
compat constraints && evalPep508 pep508Markers
)
dependencies
);
depAttrs = lib.attrNames deps;
in
builtins.map (n: pythonPackages.${normalizePackageName n}) depAttrs;
inherit pos;
meta = {
broken = ! isCompatible (poetryLib.getPythonVersion python) python-versions;
license = [ ];
inherit (python.meta) platforms;
};
passthru = {
inherit args;
preferWheel = preferWheel';
};
# We need to retrieve kind from the interpreter and the filename of the package
# Interpreters should declare what wheel types they're compatible with (python type + ABI)
# Here we can then choose a file based on that info.
src =
if isGit then
(
builtins.fetchGit ({
inherit (source) url;
rev = source.resolved_reference or source.reference;
ref = sourceSpec.branch or (if sourceSpec ? tag then "refs/tags/${sourceSpec.tag}" else "HEAD");
} // (
lib.optionalAttrs ((sourceSpec ? rev) && (lib.versionAtLeast builtins.nixVersion "2.4")) {
allRefs = true;
}) // (
lib.optionalAttrs (lib.versionAtLeast builtins.nixVersion "2.4") {
submodules = true;
})
)
)
else if isWheelUrl then
builtins.fetchurl
{
inherit (source) url;
sha256 = fileInfo.hash;
}
else if isUrl then
builtins.fetchTarball
{
inherit (source) url;
sha256 = fileInfo.hash;
}
else if isDirectory then
(poetryLib.cleanPythonSources { src = localDepPath; })
else if isFile then
localDepPath
else if isLegacy then
fetchFromLegacy
{
pname = name;
inherit python;
inherit (fileInfo) file hash;
inherit (source) url;
}
else
fetchFromPypi {
pname = name;
inherit (fileInfo) file hash kind;
inherit version;
};
}
)
{ }

View File

@ -1,46 +0,0 @@
"""
Rewrite libc/library path references to Nix store paths
Nixpkgs uses a normal patch for this but we need to be less
sensitive to changes between versions.
"""
from textwrap import dedent
import sys
import ast
import os
with open(sys.argv[1]) as f:
mod = ast.parse(f.read(), "geos.py")
class LibTransformer(ast.NodeTransformer):
_lgeos_replaced = False
def visit_If(self, node):
if ast.unparse(node).startswith("if sys.platform.startswith('linux')"):
return ast.parse(
dedent(
"""
free = CDLL(%s).free
free.argtypes = [c_void_p]
free.restype = None
"""
)
% (lambda x: "'" + x + "'" if x else None)(os.environ.get("GEOS_LIBC"))
)
return node
def visit_Assign(self, node):
_target = node.targets[0]
if (
not self._lgeos_replaced
and isinstance(_target, ast.Name)
and _target.id == "_lgeos"
):
self._lgeos_replaced = True
return ast.parse("_lgeos = CDLL('%s')" % os.environ["GEOS_LIBRARY_PATH"])
return node
with open(sys.argv[1], "w") as f:
f.write(ast.unparse(LibTransformer().visit(mod)))

View File

@ -1,133 +0,0 @@
{ lib, stdenv, poetryLib, python, isLinux ? stdenv.isLinux }:
let
inherit (lib.strings) escapeRegex hasPrefix hasSuffix hasInfix splitString removePrefix removeSuffix;
targetMachine = poetryLib.getTargetMachine stdenv;
pythonVer =
let
ver = builtins.splitVersion python.version;
major = builtins.elemAt ver 0;
minor = builtins.elemAt ver 1;
tags = [ "cp" "py" ];
in
{ inherit major minor tags; };
abiTag = "cp${pythonVer.major}${pythonVer.minor}m";
#
# Parses wheel file returning an attribute set
#
toWheelAttrs = str:
let
entries' = splitString "-" str;
el = builtins.length entries';
entryAt = builtins.elemAt entries';
# Hack: Remove version "suffixes" like 2.11.4-1
entries =
if el == 6 then [
(entryAt 0) # name
(entryAt 1) # version
# build tag is skipped
(entryAt (el - 3)) # python version
(entryAt (el - 2)) # abi
(entryAt (el - 1)) # platform
] else entries';
p = removeSuffix ".whl" (builtins.elemAt entries 4);
in
{
pkgName = builtins.elemAt entries 0;
pkgVer = builtins.elemAt entries 1;
pyVer = builtins.elemAt entries 2;
abi = builtins.elemAt entries 3;
platform = p;
};
#
# Builds list of acceptable osx wheel files
#
# <versions> accepted versions in descending order of preference
# <candidates> list of wheel files to select from
findBestMatches = versions: candidates:
let
v = lib.lists.head versions;
vs = lib.lists.tail versions;
in
if (builtins.length versions == 0)
then [ ]
else (builtins.filter (x: hasInfix v x.file) candidates) ++ (findBestMatches vs candidates);
# x = "cpXX" | "py2" | "py3" | "py2.py3"
isPyVersionCompatible = pyver@{ major, minor, tags }: x:
let
isCompat = m:
builtins.elem m.tag tags
&& m.major == major
&& builtins.compareVersions minor m.minor >= 0;
parseMarker = v:
let
tag = builtins.substring 0 2 v;
major = builtins.substring 2 1 v;
end = builtins.substring 3 3 v;
minor = if builtins.stringLength end > 0 then end else "0";
in
{ inherit major minor tag; };
markers = splitString "." x;
in
lib.lists.any isCompat (map parseMarker markers);
#
# Selects the best matching wheel file from a list of files
#
selectWheel = files:
let
filesWithoutSources = (builtins.filter (x: hasSuffix ".whl" x.file) files);
isPyAbiCompatible = pyabi: x: x == "none" || hasPrefix pyabi x || hasPrefix x pyabi || (
# The CPython stable ABI is abi3 as in the shared library suffix.
python.passthru.implementation == "cpython" &&
builtins.elemAt (lib.splitString "." python.version) 0 == "3" &&
x == "abi3"
);
withPython = ver: abi: x: (isPyVersionCompatible ver x.pyVer) && (isPyAbiCompatible abi x.abi);
withPlatform =
if isLinux
then
if targetMachine != null
then
# See PEP 600 for details.
(p:
builtins.match "any|manylinux(1|2010|2014)_${escapeRegex targetMachine}|manylinux_[0-9]+_[0-9]+_${escapeRegex targetMachine}" p != null
)
else
(p: p == "any")
else
if stdenv.isDarwin
then
if stdenv.targetPlatform.isAarch64
then (p: p == "any" || (hasInfix "macosx" p && lib.lists.any (e: hasSuffix e p) [ "arm64" "aarch64" ]))
else (p: p == "any" || (hasInfix "macosx" p && hasSuffix "x86_64" p))
else (p: p == "any");
withPlatforms = x: lib.lists.any withPlatform (splitString "." x.platform);
filterWheel = x:
let
f = toWheelAttrs x.file;
in
(withPython pythonVer abiTag f) && (withPlatforms f);
filtered = builtins.filter filterWheel filesWithoutSources;
choose = files:
let
osxMatches = [ "12_0" "11_0" "10_15" "10_14" "10_12" "10_11" "10_10" "10_9" "10_8" "10_7" "any" ];
linuxMatches = [ "manylinux1_" "manylinux2010_" "manylinux2014_" "manylinux_" "any" ];
chooseLinux = x: lib.take 1 (findBestMatches linuxMatches x);
chooseOSX = x: lib.take 1 (findBestMatches osxMatches x);
in
if isLinux
then chooseLinux files
else chooseOSX files;
in
if (builtins.length filtered == 0)
then [ ]
else choose (filtered);
in
{
inherit selectWheel toWheelAttrs isPyVersionCompatible;
}

View File

@ -1,258 +0,0 @@
{ lib, stdenv, poetryLib }: python:
let
inherit (poetryLib) ireplace;
targetMachine = poetryLib.getTargetMachine stdenv;
# Like builtins.substring but with stop being offset instead of length
substr = start: stop: s: builtins.substring start (stop - start) s;
# Strip leading/trailing whitespace from string
stripStr = s: lib.elemAt (builtins.split "^ *" (lib.elemAt (builtins.split " *$" s) 0)) 2;
findSubExpressionsFun = acc: c: (
if c == "(" then
(
let
posNew = acc.pos + 1;
isOpen = acc.openP == 0;
startPos = if isOpen then posNew else acc.startPos;
in
acc // {
inherit startPos;
exprs = acc.exprs ++ [ (substr acc.exprPos (acc.pos - 1) acc.expr) ];
pos = posNew;
openP = acc.openP + 1;
}
) else if c == ")" then
(
let
openP = acc.openP - 1;
exprs = findSubExpressions (substr acc.startPos acc.pos acc.expr);
in
acc // {
inherit openP;
pos = acc.pos + 1;
exprs = if openP == 0 then acc.exprs ++ [ exprs ] else acc.exprs;
exprPos = if openP == 0 then acc.pos + 1 else acc.exprPos;
}
) else acc // { pos = acc.pos + 1; }
);
# Make a tree out of expression groups (parens)
findSubExpressions = expr':
let
expr = " " + expr';
acc = builtins.foldl'
findSubExpressionsFun
{
exprs = [ ];
expr = expr;
pos = 0;
openP = 0;
exprPos = 0;
startPos = 0;
}
(lib.stringToCharacters expr);
tailExpr = (substr acc.exprPos acc.pos expr);
tailExprs = if tailExpr != "" then [ tailExpr ] else [ ];
in
acc.exprs ++ tailExprs;
parseExpressions = exprs:
let
splitCond = (
s: builtins.map
(x: stripStr (if builtins.typeOf x == "list" then (builtins.elemAt x 0) else x))
(builtins.split " (and|or) " (s + " "))
);
mapfn = expr: (
if (builtins.match "^ ?$" expr != null) then null # Filter empty
else if (builtins.elem expr [ "and" "or" ]) then {
type = "bool";
value = expr;
}
else {
type = "expr";
value = expr;
}
);
parse = expr: builtins.filter (x: x != null) (builtins.map mapfn (splitCond expr));
in
builtins.foldl'
(
acc: v: acc ++ (if builtins.typeOf v == "string" then parse v else [ (parseExpressions v) ])
) [ ]
exprs;
# Transform individual expressions to structured expressions
# This function also performs variable substitution, replacing environment markers with their explicit values
transformExpressions = exprs:
let
variables = {
os_name = (
if python.pname == "jython" then "java"
else "posix"
);
sys_platform = (
if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "darwin"
else throw "Unsupported platform"
);
platform_machine = targetMachine;
platform_python_implementation =
let
impl = python.passthru.implementation;
in
(
if impl == "cpython" then "CPython"
else if impl == "pypy" then "PyPy"
else throw "Unsupported implementation ${impl}"
);
platform_release = ""; # Field not reproducible
platform_system = (
if stdenv.isLinux then "Linux"
else if stdenv.isDarwin then "Darwin"
else throw "Unsupported platform"
);
platform_version = ""; # Field not reproducible
python_version = python.passthru.pythonVersion;
python_full_version = python.version;
implementation_name = python.implementation;
implementation_version = python.version;
# extra = "";
};
substituteVar = value: if builtins.hasAttr value variables then (builtins.toJSON variables."${value}") else value;
processVar = value: builtins.foldl' (acc: v: v acc) value [
stripStr
substituteVar
];
in
if builtins.typeOf exprs == "set" then
(
if exprs.type == "expr" then
(
let
mVal = ''[a-zA-Z0-9\'"_\. \-]+'';
mOp = "in|[!=<>]+";
e = stripStr exprs.value;
m' = builtins.match ''^(${mVal}) +(${mOp}) *(${mVal})$'' e;
m = builtins.map stripStr (if m' != null then m' else builtins.match ''^(${mVal}) +(${mOp}) *(${mVal})$'' e);
m0 = processVar (builtins.elemAt m 0);
m2 = processVar (builtins.elemAt m 2);
in
{
type = "expr";
value = {
# HACK: We don't know extra at eval time, so we assume the expression is always true
op = if m0 == "extra" then "true" else builtins.elemAt m 1;
values = [ m0 m2 ];
};
}
) else exprs
) else builtins.map transformExpressions exprs;
# Recursively eval all expressions
evalExpressions = exprs:
let
unmarshal = v: (
# TODO: Handle single quoted values
if v == "True" then true
else if v == "False" then false
else builtins.fromJSON v
);
hasElem = needle: haystack: builtins.elem needle (builtins.filter (x: builtins.typeOf x == "string") (builtins.split " " haystack));
op = {
"true" = x: y: true;
"<=" = x: y: op.">=" y x;
"<" = x: y: lib.versionOlder (unmarshal x) (unmarshal y);
"!=" = x: y: x != y;
"==" = x: y: x == y;
">=" = x: y: lib.versionAtLeast (unmarshal x) (unmarshal y);
">" = x: y: op."<" y x;
"~=" = v: c:
let
parts = builtins.splitVersion c;
pruned = lib.take ((builtins.length parts) - 1) parts;
upper = builtins.toString (
(lib.toInt (builtins.elemAt pruned (builtins.length pruned - 1))) + 1
);
upperConstraint = builtins.concatStringsSep "." (ireplace (builtins.length pruned - 1) upper pruned);
in
op.">=" v c && op."<" v upperConstraint;
"===" = x: y: x == y;
"in" = x: y:
let
values = builtins.filter (x: builtins.typeOf x == "string") (builtins.split " " (unmarshal y));
in
builtins.elem (unmarshal x) values;
};
in
if builtins.typeOf exprs == "set" then
(
if exprs.type == "expr" then
(
let
expr = exprs;
result = (op."${expr.value.op}") (builtins.elemAt expr.value.values 0) (builtins.elemAt expr.value.values 1);
in
{
type = "value";
value = result;
}
) else exprs
) else builtins.map evalExpressions exprs;
# Now that we have performed an eval all that's left to do is to concat the graph into a single bool
reduceExpressions = exprs:
let
cond = {
"and" = x: y: x && y;
"or" = x: y: x || y;
};
reduceExpressionsFun = acc: v: (
if builtins.typeOf v == "set" then
(
if v.type == "value" then
(
acc // {
value = cond."${acc.cond}" acc.value v.value;
}
) else if v.type == "bool" then
(
acc // {
cond = v.value;
}
) else throw "Unsupported type"
) else if builtins.typeOf v == "list" then
(
let
ret = builtins.foldl'
reduceExpressionsFun
{
value = true;
cond = "and";
}
v;
in
acc // {
value = cond."${acc.cond}" acc.value ret.value;
}
) else throw "Unsupported type"
);
in
(
builtins.foldl'
reduceExpressionsFun
{
value = true;
cond = "and";
}
exprs
).value;
in
e: builtins.foldl' (acc: v: v acc) e [
findSubExpressions
parseExpressions
transformExpressions
evalExpressions
reduceExpressions
]

View File

@ -1,82 +0,0 @@
{ lib
, poetry2nix
, python
, fetchFromGitHub
, projectDir ? ./.
, pyproject ? projectDir + "/pyproject.toml"
, poetrylock ? projectDir + "/poetry.lock"
}:
poetry2nix.mkPoetryApplication {
inherit python;
inherit projectDir pyproject poetrylock;
src = fetchFromGitHub (lib.importJSON ./src.json);
# "Vendor" dependencies (for build-system support)
postPatch = ''
# Figure out the location of poetry.core
# As poetry.core is using the same root import name as the poetry package and the python module system wont look for the root
# in the separate second location we need to link poetry.core to poetry
POETRY_CORE=$(python -c 'import poetry.core; import os.path; print(os.path.dirname(poetry.core.__file__))')
echo "import sys" >> src/poetry/__init__.py
for path in $propagatedBuildInputs; do
echo "sys.path.insert(0, \"$path\")" >> src/poetry/__init__.py
done
'';
postInstall = ''
ln -s $POETRY_CORE $out/${python.sitePackages}/poetry/core
mkdir -p "$out/share/bash-completion/completions"
"$out/bin/poetry" completions bash > "$out/share/bash-completion/completions/poetry"
mkdir -p "$out/share/zsh/site-functions"
"$out/bin/poetry" completions zsh > "$out/share/zsh/site-functions/_poetry"
mkdir -p "$out/share/fish/vendor_completions.d"
"$out/bin/poetry" completions fish > "$out/share/fish/vendor_completions.d/poetry.fish"
'';
# Propagating dependencies leads to issues downstream
# We've already patched poetry to prefer "vendored" dependencies
postFixup = ''
rm $out/nix-support/propagated-build-inputs
'';
# Fails because of impurities (network, git etc etc)
doCheck = false;
overrides = [
poetry2nix.defaultPoetryOverrides
(self: super: {
cryptography = super.cryptography.overridePythonAttrs (old: {
meta = old.meta // {
knownVulnerabilities = old.meta.knownVulnerabilities or [ ]
++ lib.optionals (lib.versionOlder old.version "41.0.0") [
"CVE-2023-2650"
"CVE-2023-2975"
"CVE-2023-3446"
"CVE-2023-3817"
"CVE-2023-38325"
];
};
});
requests = super.requests.overridePythonAttrs (old: {
meta = old.meta // {
knownVulnerabilities = old.meta.knownVulnerabilities or [ ]
++ lib.optionals (lib.versionOlder old.version "2.31.0") [
"CVE-2023-32681"
];
};
});
})
];
meta = with lib; {
inherit (python.meta) platforms;
maintainers = with maintainers; [ adisbladis jakewaksbaum ];
};
}

File diff suppressed because it is too large Load Diff

View File

@ -1,198 +0,0 @@
[tool.poetry]
name = "poetry"
version = "1.3.2"
description = "Python dependency management and packaging made easy."
authors = [
"Sébastien Eustace <sebastien@eustace.io>",
]
maintainers = [
"Arun Babu Neelicattu <arun.neelicattu@gmail.com>",
"Bjorn Neergaard <bjorn@neersighted.com>",
"Branch Vincent <branchevincent@gmail.com>",
"Bryce Drennan <github@accounts.brycedrennan.com>",
"Daniel Eades <danieleades@hotmail.com>",
"Randy Döring <radoering.poetry@gmail.com>",
"Steph Samson <hello@stephsamson.com>",
"finswimmer <finswimmer77@gmail.com>",
]
license = "MIT"
readme = "README.md"
packages = [
{ include = "poetry", from = "src" }
]
include = [
{ path = "tests", format = "sdist" }
]
homepage = "https://python-poetry.org/"
repository = "https://github.com/python-poetry/poetry"
documentation = "https://python-poetry.org/docs"
keywords = ["packaging", "dependency", "poetry"]
classifiers = [
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules"
]
[tool.poetry.urls]
Changelog = "https://python-poetry.org/history/"
[tool.poetry.build]
generate-setup-file = false
# Requirements
[tool.poetry.dependencies]
python = "^3.7"
poetry-core = "1.4.0"
poetry-plugin-export = "^1.2.0"
"backports.cached-property" = { version = "^1.0.2", python = "<3.8" }
cachecontrol = { version = "^0.12.9", extras = ["filecache"] }
cleo = "^2.0.0"
crashtest = "^0.4.1"
dulwich = "^0.20.46"
filelock = "^3.8.0"
html5lib = "^1.0"
importlib-metadata = { version = "^4.4", python = "<3.10" }
jsonschema = "^4.10.0"
keyring = "^23.9.0"
# packaging uses calver, so version is unclamped
packaging = ">=20.4"
pexpect = "^4.7.0"
pkginfo = "^1.5"
platformdirs = "^2.5.2"
requests = "^2.18"
requests-toolbelt = ">=0.9.1,<0.11.0"
shellingham = "^1.5"
tomli = { version = "^2.0.1", python = "<3.11" }
# exclude 0.11.2 and 0.11.3 due to https://github.com/sdispater/tomlkit/issues/225
tomlkit = ">=0.11.1,<1.0.0,!=0.11.2,!=0.11.3"
# trove-classifiers uses calver, so version is unclamped
trove-classifiers = ">=2022.5.19"
# exclude 20.4.5 - 20.4.6 due to https://github.com/pypa/pip/issues/9953
virtualenv = [
{ version = "^20.4.3,!=20.4.5,!=20.4.6", markers = "sys_platform != 'win32' or python_version != '3.9'" },
# see https://github.com/python-poetry/poetry/pull/6950 for details
{ version = "^20.4.3,!=20.4.5,!=20.4.6,<20.16.6", markers = "sys_platform == 'win32' and python_version == '3.9'" },
]
xattr = { version = "^0.10.0", markers = "sys_platform == 'darwin'" }
urllib3 = "^1.26.0"
[tool.poetry.group.dev.dependencies]
pre-commit = "^2.6"
[tool.poetry.group.test.dependencies]
# Cachy frozen to test backwards compatibility for `poetry.utils.cache`.
cachy = "0.3.0"
deepdiff = "^5.0"
flatdict = "^4.0.1"
httpretty = "^1.0"
pytest = "^7.1"
pytest-cov = "^4.0"
pytest-mock = "^3.9"
pytest-randomly = "^3.12"
pytest-xdist = { version = "^2.5", extras = ["psutil"] }
zipp = { version = "^3.4", python = "<3.8" }
[tool.poetry.group.typing.dependencies]
mypy = ">=0.990"
types-html5lib = ">=1.1.9"
types-jsonschema = ">=4.9.0"
types-requests = ">=2.28.8"
typing-extensions = { version = "^4.0.0", python = "<3.8" }
# only used in github actions
[tool.poetry.group.github-actions]
optional = true
[tool.poetry.group.github-actions.dependencies]
pytest-github-actions-annotate-failures = "^0.1.7"
[tool.poetry.scripts]
poetry = "poetry.console.application:main"
[build-system]
requires = ["poetry-core>=1.1.0"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
py_version = 37
profile = "black"
force_single_line = true
combine_as_imports = true
lines_between_types = 1
lines_after_imports = 2
src_paths = ["src", "tests"]
extend_skip = ["setup.py"]
known_third_party = ["poetry.core"]
[tool.black]
target-version = ['py37']
preview = true
force-exclude = '''
.*/setup\.py$
'''
[tool.mypy]
files = "src"
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true
show_error_codes = true
strict = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
# use of importlib-metadata backport at python3.7 makes it impossible to
# satisfy mypy without some ignores: but we get a different set of ignores at
# different python versions.
#
# <https://github.com/python/mypy/issues/8823>, meanwhile suppress that
# warning.
[[tool.mypy.overrides]]
module = [
'poetry.console.commands.self.show.plugins',
'poetry.installation.executor',
'poetry.mixology.version_solver',
'poetry.plugins.plugin_manager',
'poetry.repositories.installed_repository',
'poetry.utils.env',
]
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = [
'cachecontrol.*',
'lockfile.*',
'pexpect.*',
'pkginfo.*',
'requests_toolbelt.*',
'shellingham.*',
'virtualenv.*',
'xattr.*',
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = "-n auto"
testpaths = [
"tests"
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:"
]

View File

@ -1,8 +0,0 @@
{
"owner": "python-poetry",
"repo": "poetry",
"rev": "1.3.0",
"sha256": "16ng59ykm7zkjizmwb482y0hawpjjr5mvl0ahjd790xzxcc2bbbv",
"fetchSubmodules": true
}

View File

@ -1,70 +0,0 @@
{ pkgs, lib }:
let
inherit (pkgs) stdenv;
mkPluginDrv =
{ self
, plugins
, drv
, postInstall ? ""
, nativeBuildInputs ? [ ]
, buildInputs ? [ ]
}:
let
env = self.python.withPackages (ps: plugins);
in
stdenv.mkDerivation {
pname = drv.pname + "-with-plugins";
inherit (drv) src version meta;
buildInputs = drv.buildInputs ++ drv.propagatedBuildInputs ++ buildInputs;
nativeBuildInputs = builtins.filter (x: x.name != "python-output-dist-hook") (drv.nativeBuildInputs ++ nativeBuildInputs);
dontConfigure = true;
dontBuild = true;
dontUsePythonRecompileBytecode = true;
passthru = {
inherit (drv.passthru) withPlugins;
inherit plugins;
};
# Link bin/ from environment, but only if it's in a plugin
installPhase = ''
runHook preInstall
mkdir -p $out/bin
for bindir in ${lib.concatStringsSep " " (map (d: "${lib.getBin d}/bin") plugins)}; do
for bin in $bindir/*; do
ln -s ${env}/bin/$(basename $bin) $out/bin/
done
done
runHook postInstall
'';
inherit postInstall;
};
in
{
# Provide the `withPlugins` function
toPluginAble = self: { drv
, finalDrv
, postInstall ? ""
, nativeBuildInputs ? [ ]
, buildInputs ? [ ]
}: drv.overridePythonAttrs (old: {
passthru = old.passthru // {
withPlugins = pluginFn: mkPluginDrv {
plugins = [ finalDrv ] ++ pluginFn self;
inherit self postInstall nativeBuildInputs buildInputs;
drv = finalDrv;
};
};
});
}

Some files were not shown because too many files have changed in this diff Show More