Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkgs/by-name/fr/freedv/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
}:

let
codec2' = codec2.override { freedvSupport = true; };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to keep the overriding interface, we could pass these as an argument at the top "imports".
So instead of putting it in a let block, we could do:

{
  codec2,
  codec2' ? codec2.override { freedvSupport = true; },
  # other dependencies
}:

This solves the problem which the previous PR was blocked for (and partially why this PR was stalled for), as it makes it possible to use a custom codec2 as before, except the user has to use freedv.override { codec2' = someCustomCodec2; } instead of freedv.override { codec2 = someCustomCodec2; }.

Best would be to split these kinds of changes to it's own PR and hopefully get some feedback from other people if we should even keep the possibility of overriding dependencies as they were in all-packages.nix in the cost of introducing this pattern treewide. We already introduced it for some packages.

ebur128Src = fetchFromGitHub {
owner = "jiixyj";
repo = "libebur128";
Expand Down Expand Up @@ -125,7 +126,7 @@ stdenv.mkDerivation (finalAttrs: {
];

buildInputs = [
codec2
codec2'
libsamplerate
libsndfile
lpcnet
Expand Down Expand Up @@ -157,7 +158,7 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "USE_NATIVE_AUDIO" (with stdenv.hostPlatform; isLinux || isDarwin))
];

env.NIX_CFLAGS_COMPILE = "-I${codec2.src}/src";
env.NIX_CFLAGS_COMPILE = "-I${codec2'.src}/src";

doCheck = false;

Expand Down
Loading
Loading