Which is the best way to revert my Eclipse change?

I'd like to introduce this:

{ [...], version ? "3.5.0" }: # << adding vesrion defaulting to  3.5.0

let
  sources = {
    "3.5.0-i686-linux" = fetchurl ..;
    "3.5.0-i686-linux" = fetchurl ..;

    # note: not all plugins can be used with this version yet:
    "3.5.2-x86_64" = fetchurl ..;
    "3.5.2-x86_64" = fetchurl ..;
    [..]
  }

in ... {
  src =
    let key = "${version}-{stdenv.system}";
    stdenv.lib.maybeAttr key (throw "no source given for ${key}") sources;
  [ ... ]
}

Then you can override version only to select a specific version.

However the syntax using strings as keys is only possible using
listToAttr at the moment.

Eelco Dolstra: are you interested in helping me extend Nix allowing
arbitrary strings as attr names?

I failed in the past. I got a segfault I couldn't cope with.

Marc Weber
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to