On Wed, Jun 30, 2021 at 08:32:54AM -0700, Cole Helbling wrote:
On Wed Jun 30, 2021 at 2:20 AM PDT, Alyssa Ross wrote:
We need to remove the upstream version, to replace it here with the CrOS version, and also we need to provide the CrOS version as a build input, not a native build input. --- .../linux/chromium-os/modem-manager/next.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix index d40b2c9292e..a2239a0b9c8 100644 --- a/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix +++ b/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix @@ -3,7 +3,12 @@ }:
modemmanager.overrideAttrs ( - { pname, nativeBuildInputs ? [], passthru ? {}, meta ? {}, ... }: + { pname + , nativeBuildInputs ? [], buildInputs ? [] + , passthru ? {}, meta ? {} + , ... + }: + { pname = "${pname}-chromiumos-next-unstable"; version = "2019-10-17"; @@ -12,7 +17,10 @@ modemmanager.overrideAttrs ( upstreamInfo.components."src/third_party/modemmanager-next";
nativeBuildInputs = nativeBuildInputs ++ - [ autoreconfHook autoconf-archive libqmi libxslt ]; + [ autoreconfHook autoconf-archive libxslt ]; + + buildInputs = [ libqmi ] + ++ lib.filter (x: x ? pname && x.pname != "libqmi") buildInputs;
Is having two "libqmi"s really that big of a deal? Is there a scenario where this prevents e.g. mixing versions or something? Seems like it'd be easier to just `inherit buildInputs` or `buildInputs = buildInputs` (latter for future extensibility).
It just occurred to me that there's a better way of doing this, that prevents any ambiguity about what's happening with libqmi. What do you think about this instead? diff --git c/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix w/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix index d40b2c9292e..17d95c2b3bc 100644 --- c/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix +++ w/pkgs/os-specific/linux/chromium-os/modem-manager/next.nix @@ -2,7 +2,7 @@ , autoconf-archive, libqmi, libxslt }: -modemmanager.overrideAttrs ( +(modemmanager.override { inherit libqmi; }).overrideAttrs ( { pname, nativeBuildInputs ? [], passthru ? {}, meta ? {}, ... }: { pname = "${pname}-chromiumos-next-unstable"; @@ -12,7 +12,7 @@ modemmanager.overrideAttrs ( upstreamInfo.components."src/third_party/modemmanager-next"; nativeBuildInputs = nativeBuildInputs ++ - [ autoreconfHook autoconf-archive libqmi libxslt ]; + [ autoreconfHook autoconf-archive libxslt ]; passthru = passthru // { updateScript = ../update.py;