2023-09-28 22:38:38 +00:00
|
|
|
{ stdenv
|
|
|
|
, python3
|
|
|
|
, fetchPypi
|
2023-10-26 18:18:30 +00:00
|
|
|
, fetchpatch
|
2023-09-28 22:38:38 +00:00
|
|
|
, src
|
|
|
|
, version
|
|
|
|
}:
|
2019-10-23 10:07:42 +00:00
|
|
|
|
|
|
|
let
|
2022-06-07 00:08:01 +00:00
|
|
|
buildAzureCliPackage = with py.pkgs; buildPythonPackage;
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2023-03-03 01:48:16 +00:00
|
|
|
overrideAzureMgmtPackage = package: version: extension: hash:
|
2023-10-27 06:30:24 +00:00
|
|
|
package.overridePythonAttrs (oldAttrs: {
|
2019-10-23 10:07:42 +00:00
|
|
|
inherit version;
|
|
|
|
|
2023-05-25 11:54:35 +00:00
|
|
|
src = fetchPypi {
|
2019-10-23 10:07:42 +00:00
|
|
|
inherit (oldAttrs) pname;
|
2023-03-03 01:48:16 +00:00
|
|
|
inherit version hash extension;
|
2019-10-23 10:07:42 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2021-12-06 06:06:32 +00:00
|
|
|
py = python3.override {
|
2019-10-23 10:07:42 +00:00
|
|
|
packageOverrides = self: super: {
|
|
|
|
inherit buildAzureCliPackage;
|
|
|
|
|
|
|
|
# core and the actual application are highly coupled
|
|
|
|
azure-cli-core = buildAzureCliPackage {
|
|
|
|
pname = "azure-cli-core";
|
|
|
|
inherit version src;
|
|
|
|
|
2023-10-26 18:18:30 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-python311.patch";
|
|
|
|
url = "https://github.com/Azure/azure-cli/commit/a5198b578b17de934e15b1c92e369e45323e9658.patch";
|
|
|
|
hash = "sha256-qbyKF6Vvtz8QwY78sG7ptTVcbM2IR+phntOKqsrWetE=";
|
|
|
|
stripLen = 2;
|
|
|
|
includes = [
|
|
|
|
"azure/cli/core/tests/test_command_registration.py"
|
|
|
|
"azure/cli/core/tests/test_help.py"
|
|
|
|
"azure/cli/core/tests/test_parser.py"
|
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-12 00:44:47 +00:00
|
|
|
sourceRoot = "${src.name}/src/azure-cli-core";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = with self; [
|
|
|
|
argcomplete
|
|
|
|
azure-cli-telemetry
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-common
|
2020-04-23 00:01:49 +00:00
|
|
|
azure-mgmt-core
|
2021-03-11 20:00:18 +00:00
|
|
|
cryptography
|
2023-04-17 22:29:20 +00:00
|
|
|
distro
|
2019-10-23 10:07:42 +00:00
|
|
|
humanfriendly
|
2019-12-01 22:28:29 +00:00
|
|
|
jmespath
|
2019-10-23 10:07:42 +00:00
|
|
|
knack
|
2020-05-18 23:39:41 +00:00
|
|
|
msal-extensions
|
2023-10-27 06:30:24 +00:00
|
|
|
msal
|
2019-10-23 10:07:42 +00:00
|
|
|
msrestazure
|
2023-10-27 06:30:24 +00:00
|
|
|
packaging
|
2019-10-23 10:07:42 +00:00
|
|
|
paramiko
|
2020-04-23 00:01:49 +00:00
|
|
|
pkginfo
|
2019-12-01 22:28:29 +00:00
|
|
|
psutil
|
2019-10-23 10:07:42 +00:00
|
|
|
pyjwt
|
|
|
|
pyopenssl
|
|
|
|
requests
|
2021-12-06 06:06:32 +00:00
|
|
|
];
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = with self; [ pytest ];
|
2023-09-28 22:38:38 +00:00
|
|
|
|
2019-12-01 22:28:29 +00:00
|
|
|
doCheck = stdenv.isLinux;
|
2023-09-28 22:38:38 +00:00
|
|
|
|
2021-09-12 01:43:54 +00:00
|
|
|
# ignore tests that does network call, or assume powershell
|
2019-10-23 10:07:42 +00:00
|
|
|
checkPhase = ''
|
2019-12-01 22:28:29 +00:00
|
|
|
python -c 'import azure.common; print(azure.common)'
|
2023-10-27 06:30:24 +00:00
|
|
|
|
2021-11-20 23:16:12 +00:00
|
|
|
PYTHONPATH=$PWD:${src}/src/azure-cli-testsdk:$PYTHONPATH HOME=$TMPDIR pytest \
|
|
|
|
azure/cli/core/tests \
|
2019-12-01 22:28:29 +00:00
|
|
|
--ignore=azure/cli/core/tests/test_profile.py \
|
2020-09-28 18:13:29 +00:00
|
|
|
--ignore=azure/cli/core/tests/test_generic_update.py \
|
2021-09-13 15:09:52 +00:00
|
|
|
-k 'not metadata_url and not test_send_raw_requests and not test_format_styled_text_legacy_powershell'
|
2019-10-23 10:07:42 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"azure.cli.telemetry"
|
|
|
|
"azure.cli.core"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
azure-cli-telemetry = buildAzureCliPackage {
|
|
|
|
pname = "azure-cli-telemetry";
|
2023-10-27 06:30:24 +00:00
|
|
|
version = "1.1.0";
|
2019-10-23 10:07:42 +00:00
|
|
|
inherit src;
|
|
|
|
|
2021-01-12 00:44:47 +00:00
|
|
|
sourceRoot = "${src.name}/src/azure-cli-telemetry";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
propagatedBuildInputs = with self; [
|
2019-10-23 10:07:42 +00:00
|
|
|
applicationinsights
|
|
|
|
portalocker
|
|
|
|
];
|
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
nativeCheckInputs = with self; [ pytest ];
|
2019-10-23 10:07:42 +00:00
|
|
|
# ignore flaky test
|
|
|
|
checkPhase = ''
|
|
|
|
cd azure
|
|
|
|
HOME=$TMPDIR pytest -k 'not test_create_telemetry_note_file_from_scratch'
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-04-17 22:29:20 +00:00
|
|
|
antlr4-python3-runtime = super.antlr4-python3-runtime.override (_: {
|
2022-06-06 23:13:10 +00:00
|
|
|
antlr4 = super.pkgs.antlr4_9;
|
|
|
|
});
|
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-mgmt-appcontainers = overrideAzureMgmtPackage super.azure-mgmt-appcontainers "2.0.0" "zip"
|
|
|
|
"sha256-ccdIdvdgTYPWEZCWqkLc8lEuMuAEERvl5B1huJyBkvU=";
|
2021-09-12 01:43:54 +00:00
|
|
|
|
|
|
|
azure-mgmt-batchai = overrideAzureMgmtPackage super.azure-mgmt-batchai "7.0.0b1" "zip"
|
|
|
|
"sha256-mT6vvjWbq0RWQidugR229E8JeVEiobPD3XA/nDM3I6Y=";
|
2020-05-18 23:39:41 +00:00
|
|
|
|
2023-08-09 19:44:29 +00:00
|
|
|
azure-mgmt-policyinsights = overrideAzureMgmtPackage super.azure-mgmt-policyinsights "1.1.0b4" "zip"
|
|
|
|
"sha512-NW2BNj45lKzBmPXWMuBnVEDG2C6xzo9J/QjcC5fczvyhKBIkhugJVOWdPUsSzyGeQYKdqpRWPOl0yBG/eblHQA==";
|
2020-02-10 01:55:18 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-mgmt-cdn = overrideAzureMgmtPackage super.azure-mgmt-cdn "12.0.0" "zip"
|
|
|
|
"sha256-t8PuIYkjS0r1Gs4pJJJ8X9cz8950imQtbVBABnyMnd0=";
|
|
|
|
|
2023-07-22 07:04:27 +00:00
|
|
|
azure-mgmt-rdbms = overrideAzureMgmtPackage super.azure-mgmt-rdbms "10.2.0b10" "zip"
|
|
|
|
"sha256-sM8oZdhv+5WCd4RnMtEmCikTBmzGsap5heKzSbHbRPI=";
|
2020-04-23 00:01:49 +00:00
|
|
|
|
2023-04-17 22:29:20 +00:00
|
|
|
azure-mgmt-appconfiguration = overrideAzureMgmtPackage super.azure-mgmt-appconfiguration "3.0.0" "zip"
|
|
|
|
"sha256-FJhuVgqNjdRIegP4vUISrAtHvvVle5VQFVITPm4HLEw=";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2023-01-09 13:01:49 +00:00
|
|
|
azure-mgmt-eventgrid = overrideAzureMgmtPackage super.azure-mgmt-eventgrid "10.2.0b2" "zip"
|
|
|
|
"sha256-QcHY1wCwQyVOEdUi06/wEa4dqJH5Ccd33gJ1Sju0qZA=";
|
2020-07-14 19:46:20 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-mgmt-iothub = overrideAzureMgmtPackage super.azure-mgmt-iothub "2.3.0" "zip"
|
|
|
|
"sha256-ml+koj52l5o0toAcnsGtsw0tGnO5F/LKq56ovzdmx/A=";
|
2021-08-28 05:53:59 +00:00
|
|
|
|
2022-06-06 23:13:10 +00:00
|
|
|
azure-mgmt-iotcentral = overrideAzureMgmtPackage super.azure-mgmt-iotcentral "10.0.0b1" "zip"
|
|
|
|
"sha256-1CiZuTXYhIb74eGQZUJHHzovYNnnVd3Ydu1UCy2Bu00=";
|
2020-01-09 17:44:39 +00:00
|
|
|
|
2019-10-23 10:07:42 +00:00
|
|
|
azure-mgmt-kusto = overrideAzureMgmtPackage super.azure-mgmt-kusto "0.3.0" "zip"
|
2023-03-03 01:48:16 +00:00
|
|
|
"sha256-nri3eB/UQQ7p4gfNDDmDuvnlhBS1tKGISdCYVuNrrN4=";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2020-06-03 00:36:04 +00:00
|
|
|
azure-mgmt-devtestlabs = overrideAzureMgmtPackage super.azure-mgmt-devtestlabs "4.0.0" "zip"
|
2023-03-03 01:48:16 +00:00
|
|
|
"sha256-WVScTEBo8mRmsQl7V0qOUJn7LNbIvgoAOVsG07KeJ40=r";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2022-06-06 23:13:10 +00:00
|
|
|
azure-mgmt-loganalytics = overrideAzureMgmtPackage super.azure-mgmt-loganalytics "13.0.0b4" "zip"
|
|
|
|
"sha256-Jm1t7v5vyFjNNM/evVaEI9sXJKNwJk6XAXuJSRSnKHk=";
|
2020-04-23 00:01:49 +00:00
|
|
|
|
2022-06-06 23:13:10 +00:00
|
|
|
azure-mgmt-media = overrideAzureMgmtPackage super.azure-mgmt-media "9.0.0" "zip"
|
|
|
|
"sha256-TI7l8sSQ2QUgPqiE3Cu/F67Wna+KHbQS3fuIjOb95ZM=";
|
2019-12-21 06:04:51 +00:00
|
|
|
|
2023-01-09 13:01:49 +00:00
|
|
|
azure-mgmt-web = overrideAzureMgmtPackage super.azure-mgmt-web "7.0.0" "zip"
|
|
|
|
"sha256-WvyNgfiliEt6qawqy8Le8eifhxusMkoZbf6YcyY1SBA=";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-mgmt-netapp = overrideAzureMgmtPackage super.azure-mgmt-netapp "10.1.0" "zip"
|
|
|
|
"sha256-eJiWTOCk2C79Jotku9bKlu3vU6H8004hWrX+h76MjQM=";
|
2020-06-03 00:36:04 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-mgmt-sql = overrideAzureMgmtPackage super.azure-mgmt-sql "4.0.0b12" "tar.gz"
|
|
|
|
"sha256-LJx9cdtqpoHl1pPGYodoA50y8NP4ftbXhY7zohsCPH8=";
|
2020-01-09 17:50:09 +00:00
|
|
|
|
2023-04-17 22:29:20 +00:00
|
|
|
azure-mgmt-sqlvirtualmachine = overrideAzureMgmtPackage super.azure-mgmt-sqlvirtualmachine "1.0.0b5" "zip"
|
|
|
|
"sha256-ZFgJflgynRSxo+B+Vso4eX1JheWlDQjfJ9QmupXypMc=";
|
2019-12-03 02:31:31 +00:00
|
|
|
|
2023-01-09 13:01:49 +00:00
|
|
|
azure-mgmt-synapse = overrideAzureMgmtPackage super.azure-mgmt-synapse "2.1.0b5" "zip"
|
|
|
|
"sha256-5E6Yf1GgNyNVjd+SeFDbhDxnOA6fOAG6oojxtCP4m+k=";
|
2020-09-02 20:56:54 +00:00
|
|
|
|
2023-01-09 13:01:49 +00:00
|
|
|
azure-mgmt-eventhub = overrideAzureMgmtPackage super.azure-mgmt-eventhub "10.1.0" "zip"
|
|
|
|
"sha256-MZqhSBkwypvEefhoEWEPsBUFidWYD7qAX6edcBDDSSA=";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-mgmt-keyvault = overrideAzureMgmtPackage super.azure-mgmt-keyvault "10.2.3" "zip"
|
|
|
|
"sha256-JDM6F0ToMpUeBlLULih17TLzCbrNdxrGrcq5oIfsybU=";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2021-07-08 20:34:22 +00:00
|
|
|
azure-mgmt-applicationinsights = overrideAzureMgmtPackage super.azure-mgmt-applicationinsights "1.0.0" "zip"
|
2023-03-03 01:48:16 +00:00
|
|
|
"sha256-woeix9703hn5LAwxugKGf6xvW433G129qxkoi7RV/Fs=";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2021-09-12 01:43:54 +00:00
|
|
|
azure-mgmt-servicefabric = overrideAzureMgmtPackage super.azure-mgmt-servicefabric "1.0.0" "zip"
|
2023-03-03 01:48:16 +00:00
|
|
|
"sha256-3jXhF5EoMsGp6TEJqNJMq5T1VwOpCHsuscWwZVs7GRM=";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2023-01-09 13:01:49 +00:00
|
|
|
azure-mgmt-servicelinker = overrideAzureMgmtPackage super.azure-mgmt-servicelinker "1.2.0b1" "zip"
|
|
|
|
"sha256-RK1Q51Q0wAG55oKrFmv65/2AUKl+gRdp27t/EcuMONk=";
|
2022-04-22 17:16:53 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-storage-common = overrideAzureMgmtPackage super.azure-storage-common "1.4.2" "tar.gz"
|
|
|
|
"sha256-Tsh8dTfUV+yVJS4ORkd+LBzPM3dP/v0F2FRGgssK5AE=";
|
2020-09-02 20:56:54 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-keyvault-keys = overrideAzureMgmtPackage super.azure-keyvault-keys "4.8.0b2" "zip"
|
|
|
|
"sha256-VUwQJAwpZIQ8fzBUjUX0ui2yaVkDK7p0fwmnz373XbY=";
|
2019-10-23 10:07:42 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-mgmt-datalake-store = overrideAzureMgmtPackage super.azure-mgmt-datalake-store "0.5.0" "zip"
|
|
|
|
"sha256-k3bTVJVmHRn4rMVgT2ewvFlJOxg1u8SA+aGVL5ABekw=";
|
2021-11-30 16:23:55 +00:00
|
|
|
|
2023-10-27 06:30:24 +00:00
|
|
|
azure-mgmt-resource = overrideAzureMgmtPackage super.azure-mgmt-resource "23.1.0b2" "zip"
|
|
|
|
"sha256-kMmiKVwjPgmsTIxxxDRNXE41jSTJkemnKhO+P/OcPZI=";
|
2019-10-23 10:07:42 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
2023-08-26 09:08:02 +00:00
|
|
|
py
|