aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--default.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index c592e4c..4cf8a53 100644
--- a/default.nix
+++ b/default.nix
@@ -37,6 +37,76 @@ self: super:
in
{
+ # XXX hack to produce a functional azure-cli with nixpkgs 19.03
+ # without this, running `az` will fail with:
+ # /nix/store/XXX-python3-3.6.8/bin/python: No module named azure.cli
+ #
+ # This issue needs to be bisected
+ # good: c1427bf45ffd9f738cb811f980a7a4accf342783 (nixpkgs 18.09)
+ # bad: 9ec7625cee5365c741dee7b45a19aff5d5d56205 (nixpkgs 19.03)
+ buildPythonPackage = let
+ needs_cleanup = {
+ azure-batch = true;
+ azure-common = true;
+ azure-graphrbac = true;
+ azure-mgmt-advisor = true;
+ azure-mgmt-authorization = true;
+ azure-mgmt-batch = true;
+ azure-mgmt-batchai = true;
+ azure-mgmt-billing = true;
+ azure-mgmt-cdn = true;
+ azure-mgmt-cognitiveservices = true;
+ azure-mgmt-consumption = true;
+ azure-mgmt-containerinstance = true;
+ azure-mgmt-containerservice = true;
+ azure-mgmt-cosmosdb = true;
+ azure-mgmt-datalake-analytics = true;
+ azure-mgmt-datalake-store = true;
+ azure-mgmt-datamigration = true;
+ azure-mgmt-devtestlabs = true;
+ azure-mgmt-dns = true;
+ azure-mgmt-eventgrid = true;
+ azure-mgmt-eventhub = true;
+ azure-mgmt-iothub = true;
+ azure-mgmt-iothubprovisioningservices = true;
+ azure-mgmt-keyvault = true;
+ azure-mgmt-loganalytics = true;
+ azure-mgmt-managementgroups = true;
+ azure-mgmt-marketplaceordering = true;
+ azure-mgmt-media = true;
+ azure-mgmt-monitor = true;
+ azure-mgmt-msi = true;
+ azure-mgmt-network = true;
+ azure-mgmt-rdbms = true;
+ azure-mgmt-recoveryservices = true;
+ azure-mgmt-recoveryservicesbackup = true;
+ azure-mgmt-redis = true;
+ azure-mgmt-reservations = true;
+ azure-mgmt-resource = true;
+ azure-mgmt-search = true;
+ azure-mgmt-servicebus = true;
+ azure-mgmt-servicefabric = true;
+ azure-mgmt-sql = true;
+ azure-mgmt-storage = true;
+ azure-mgmt-trafficmanager = true;
+ azure-mgmt-web = true;
+ azure-storage-blob = true;
+ azure-storage-common = true;
+ };
+ in attrs:
+ with self.lib;
+ overrideDerivation (python-super.buildPythonPackage attrs) (drv:
+ optionalAttrs (needs_cleanup.${drv.pname} or false) {
+ postInstall = ''
+ (
+ cd $out/lib/${python-super.python.libPrefix}/site-packages/azure
+ if test -e __init__.py; then
+ rm __init__.py
+ rm -R __pycache__
+ fi
+ )
+ '';
+ });
applicationinsights = python-super.callPackage ./pkgs/development/python-modules/applicationinsights {};