ctucx.git: nixfiles

ctucx' nixfiles

commit 6b126651a0a3446ae1d2a9a6f158f4a618113c0c
parent f576cc9dd7d08efb25580d9cd266a02694332dda
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 16 Jun 2022 14:49:18 +0200

fix bind and garminexport on darwin
4 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/configurations/darwin/nixpkgs-overrides.nix b/configurations/darwin/nixpkgs-overrides.nix
@@ -0,0 +1,28 @@
+{ pkgs, lib, ... }:
+
+{
+
+  nixpkgs.overlays = [
+    (final: prev: {
+
+      # jemalloc depends on llvm10 which is doesn't supports darwin-aarch64
+      # however bind seems to build fine w/o jemalloc
+      bind = prev.bind.override { jemalloc = null; };
+
+      # disable pyopenssl-dependency on cloudscraper since it is broken on aarch64
+      python3 = prev.python3.override {
+        packageOverrides = python3-final: python3-prev: {
+          cloudscraper = python3-prev.cloudscraper.override {
+            requests-toolbelt = (python3-prev.requests-toolbelt.override {
+              pyopenssl = null;
+            }).overridePythonAttrs (old: {
+              doCheck = false;
+            });
+          };
+        };
+       };
+
+    })
+  ];
+
+}
diff --git a/machines/blechbuechse/darwin-configuration.nix b/machines/blechbuechse/darwin-configuration.nix
@@ -14,6 +14,7 @@ in {
 
     ../../configurations/yubikey.nix
 
+    ../../configurations/darwin/nixpkgs-overrides.nix
     ../../configurations/darwin/systemSettings.nix
     ../../configurations/darwin/appSettings.nix
     ../../configurations/darwin/keyboard.nix
diff --git a/machines/blechkasten/darwin-configuration.nix b/machines/blechkasten/darwin-configuration.nix
@@ -14,6 +14,7 @@ in {
 
     ../../configurations/yubikey.nix
 
+    ../../configurations/darwin/nixpkgs-overrides.nix
     ../../configurations/darwin/systemSettings.nix
     ../../configurations/darwin/appSettings.nix
     ../../configurations/darwin/keyboard.nix
diff --git a/pkgs/garminexport.nix b/pkgs/garminexport.nix
@@ -1,10 +1,10 @@
-{ python3Packages, fetchFromGitHub, ... }:
+{ python3, fetchFromGitHub, ... }:
 
-python3Packages.buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "garminexport";
   version = "0.4.1";
 
-  propagatedBuildInputs = with python3Packages; [
+  propagatedBuildInputs = with python3.pkgs; [
     cloudscraper
     requests
     python-dateutil