Skip to content

Instantly share code, notes, and snippets.

@anka-213
Created June 11, 2012 16:36
Show Gist options
  • Save anka-213/2911131 to your computer and use it in GitHub Desktop.
Save anka-213/2911131 to your computer and use it in GitHub Desktop.
Opera next override
# ~/.nixpkgs/config.nix
{
packageOverrides = pkgs: let
inherit (builtins) substring stringLength sub;
in {
operaNext = pkgs.lib.overrideDerivation pkgs.opera (oldAttrs:
let s = oldAttrs.preFixup; l=stringLength s; in
rec {
version = "12.00-1450";
name = "opera-next-${version}";
src = pkgs.fetchurl {
url = "http://snapshot.opera.com/unix/next_${version}/${name}.i386.linux.tar.xz";
sha256 = "1k6qr03i0gnyc3407skizrwv6hdc3h3k3qxa9d6dq70p1xa6rw5k";
};
preFixup = "find $out/lib/opera-next" + (substring 20 (sub l 20) s);
postFixup = ''
oldRPATH=`patchelf --print-rpath $out/lib/opera-next/opera-next`
patchelf --set-rpath $oldRPATH:${pkgs.cups}/lib $out/lib/opera-next/opera-next
'';
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment