[Nix-dev] overriding a package
Bjørn Forsman
bjorn.forsman at gmail.com
Sat Jan 31 16:10:51 CET 2015
On 31 January 2015 at 16:07, Catonano <catonano at gmail.com> wrote:
> I am following this guide to override a package
>
> https://nixos.org/wiki/Nix_Modifying_Packages#Overriding_Existing_Packages
>
> I copied and pasted the example about the "mu" and "mySed" packages and I
> ended up with this
>
>
>
> {
> 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 = fetchurl {
> url =
> http://www.cs.utah.edu/plt/snapshots/current/installers/racket-6.1.1.8-src.tgz;
> sha256 =
> "c9b4b634cdda62841739ed41179ed3daf42b7231cd024d8d3a7b39cfe0e44fc3";
> };
> patches = [];
> });
> };
> }
>
> The result is
>
> nix-env -i InfTaRacket
> error: undefined variable ‘fetchurl’ at "/home/me/.nixpkgs/config.nix":14:16
Try pkgs.fetchurl instead.
Best regards,
Bjørn Forsman
More information about the nix-dev
mailing list