[Nix-dev] overriding a package

Catonano catonano at gmail.com
Sat Jan 31 16:41:16 CET 2015


2015-01-31 16:20 GMT+01:00 Bjørn Forsman <bjorn.forsman at gmail.com>:

> On 31 January 2015 at 16:14, Catonano <catonano at gmail.com> wrote:
>
> I don't think you placed the "pkgs.fetchurl" where I meant. In the
> code you pasted, there was only one "fetchurl". Replace that one with
> "pkgs.fetchurl" (without the quotes).
>
> - Bjørn
>

Here it is

{
     packageOverrides = pkgs: rec {

       # Create a new package, "myDrRacket", which is identical to an
       #   existing package, "racket", but uses a different version.
       myRacket = pkgs.stdenv.lib.overrideDerivation pkgs.racket (oldAttrs:
{
         pname = "InfTaRacket";
     version = "6.1.1.8";
     #name = "${pname}-${version}";
         src = *pkgs.fetchurl* {
           url =
http://www.cs.utah.edu/plt/snapshots/current/installers/racket-6.1.1.8-src.tgz
;
           sha256 =
"c9b4b634cdda62841739ed41179ed3daf42b7231cd024d8d3a7b39cfe0e44fc3";
         };
         patches = [];
       });
     };
   }

And this is the result

error: anonymous function at "/home/me/.nixpkgs/config.nix":1:1 called with
unexpected argument ‘pkgs’, at
"/nix/store/i99ncvcy3p4awz7b0m35gcknkizzrpag-nixpkgs-15.05pre55083.597373b/nixpkgs/pkgs/top-level/all-packages.nix":67:14
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150131/43174c14/attachment.html 


More information about the nix-dev mailing list