Ashkan
Ashkan

Reputation: 1673

How to modify a specific derivation option in nix package manager

I want to modify the definition of a Nix derivation (emacs macport). I wish to change the configureFlag value and "--with-mac-metal" to it.

I have tried the following with no luck:

  emacsMacport.overrideDerivation
  (old: {
    configureFlags = [
      "LDFLAGS=-L${ncurses.out}/lib"
      "--with-xml2=yes"
      "--with-gnutls=yes"
      "--with-mac"
      "--with-modules"
      "--enable-mac-app=$$out/Applications"
      "--with-mac-metal"
    ];
  })

I am using home-manager and nix-darwin, and I get the following exception:

error: A definition for option `home-manager.users.ashk.home.packages.[definition 16-entry 3]' is not of type `package'. Definition values:
       - In `/nix/store/mkcwa9i9brbxf81a01whhy53yzk87c9d-source/modules/hosts/zebra/home.nix': <function>
(use '--show-trace' to show detailed location information)        

Upvotes: 0

Views: 706

Answers (1)

Robert Hensing
Robert Hensing

Reputation: 7359

You need to parenthesize function applications when they're in a list literal. It's weird.

You'll probably never get used to this, judging from my own experience using Nix extensively for years.

Upvotes: 2

Related Questions