From 05e7fee42cb209ab9ca014fae58d0ba94ffe3901 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 30 Dec 2021 12:55:18 -0800 Subject: [PATCH 1/2] overrides: Add override to build dbus-python --- overrides.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/overrides.nix b/overrides.nix index a3cf0e7..8b9f568 100644 --- a/overrides.nix +++ b/overrides.nix @@ -247,6 +247,36 @@ self: super: buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ]; }); + dbus-python = super.dbus-python.overridePythonAttrs (old: { + outputs = [ "out" "dev" ]; + + postPatch = old.postPatch or "" + '' + substituteInPlace ./configure --replace /usr/bin/file ${pkgs.file}/bin/file + substituteInPlace ./dbus-python.pc.in --replace 'Cflags: -I''${includedir}' 'Cflags: -I''${includedir}/dbus-1.0' + ''; + + configureFlags = (old.configureFlags or [ ]) ++ [ + "PYTHON_VERSION=${lib.versions.major self.python.version}" + ]; + + preConfigure = lib.concatStringsSep "\n" [ + (old.preConfigure or "") + (if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then '' + MACOSX_DEPLOYMENT_TARGET=10.16 + '' else "") + ]; + + preBuild = old.preBuild or "" + '' + make distclean + ''; + + nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkgs.pkg-config ]; + buildInputs = old.buildInputs or [ ] ++ [ pkgs.dbus pkgs.dbus-glib ] + # My guess why it's sometimes trying to -lncurses. + # It seems not to retain the dependency anyway. + ++ lib.optional (! self.python ? modules) pkgs.ncurses; + }); + dcli = super.dcli.overridePythonAttrs (old: { propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.setuptools ]; }); From b19f40ccac28b4a2a2884879beab5a52c96fa535 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 30 Dec 2021 12:55:35 -0800 Subject: [PATCH 2/2] overrides: Add override to build python-olm --- overrides.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/overrides.nix b/overrides.nix index 8b9f568..6142eef 100644 --- a/overrides.nix +++ b/overrides.nix @@ -1509,6 +1509,12 @@ self: super: } ); + python-olm = super.python-olm.overridePythonAttrs ( + old: { + buildInputs = old.buildInputs or [ ] ++ [ pkgs.olm ]; + } + ); + python-snappy = super.python-snappy.overridePythonAttrs ( old: { buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.snappy ];