[Nix-dev] Treating emacs24-nox as an alternative to emacs

Mathijs Kwik mathijs at bluescreen303.nl
Sun Sep 1 23:30:24 CEST 2013


Aristid Breitkreuz <aristidb at gmail.com> writes:

> Try something more like this:
>
> {
>     packageOverrides = pkgs:
>      rec
>      {
>        emacs = pkgs.emacs24-nox;
>        djr = pkgs.buildEnv {
>            name = "djr";
>            paths = with pkgs; [emacs mu];
>        };
>      };
> }

And note that the djr buildEnv is not really related to the fact that
you want to override emacs. It's just a better/more convenient way to
keep all your packages up to date.

But the following would suffice:

{ packageOverrides = pkgs: 
    { emacs = pkgs.emacs24-nox; };
}

Or just

{ packageOverrides = pkgs: 
    { emacs24 = pkgs.emacs24.override { withX = false; }; };
}

So we don't end up with lots of top-level variations in
all-packages.nix for emacs-without-gtk-but-with-alsa,
emacs-noimagemagick, and other combinations :)


>
>
> 2013/9/1 Danie Roux <lists at danieroux.com>
>
>> On Sun, Sep 1, 2013 at 10:54 PM, Mathijs Kwik <mathijs at bluescreen303.nl>
>> wrote:
>> > Danie Roux <lists at danieroux.com> writes:
>> >> mu has a dependency on emacs and I don't know how to make it believe
>> >> that emacs24-nox satisfies that dependency.
>> >
>> > You should probably use packageOverrides, see the nixpkgs.config option
>> > in the configuration.nix manpage.
>> >
>> > Or use it locally (in your user profile) as explained here:
>> > http://nixos.org/wiki/Howto_keep_multiple_packages_up_to_date_at_once
>>
>> This was an attempt in that direction, which doesn't have the desired
>> effect:
>>
>> {
>>     packageOverrides = pkgs:
>>      let
>>        emacs = pkgs.emacs24-nox;
>>      in
>>      rec
>>      {
>>        djr = pkgs.buildEnv {
>>            name = "djr";
>>            paths = with pkgs; [emacs mu];
>>        };
>>      };
>> }
>>
>> nix-env --dry-run -i djr
>>
>> --
>> Danie Roux
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>


More information about the nix-dev mailing list