diff --git a/pkgs/applications/networking/browsers/brave/default.nix b/pkgs/applications/networking/browsers/brave/default.nix new file mode 100644 index 00000000000..d097e0b448c --- /dev/null +++ b/pkgs/applications/networking/browsers/brave/default.nix @@ -0,0 +1,108 @@ +{ stdenv, lib, fetchurl, + dpkg, + alsaLib, + at-spi2-atk, + atk, + cairo, + cups, + dbus, + expat, + fontconfig, + freetype, + gdk_pixbuf, + glib, + gnome2, + gtk3, + libuuid, + libX11, + libXcomposite, + libXcursor, + libXdamage, + libXext, + libXfixes, + libXi, + libXrandr, + libXrender, + libXScrnSaver, + libXtst, + nspr, + nss, + pango, + udev, + xorg, + zlib +}: + +let rpath = lib.makeLibraryPath [ + alsaLib + at-spi2-atk + atk + cairo + cups + dbus + expat + fontconfig + freetype + gdk_pixbuf + glib + gnome2.GConf + gtk3 + libuuid + libX11 + libXcomposite + libXcursor + libXdamage + libXext + libXfixes + libXi + libXrandr + libXrender + libXScrnSaver + libXtst + nspr + nss + pango + udev + xorg.libxcb + zlib +]; + + +in stdenv.mkDerivation rec { + name = "brave"; + version = "0.25.2"; + + src = fetchurl { + url = "https://github.com/brave/browser-laptop/releases/download/v${version}dev/brave_${version}_amd64.deb"; + sha256 = "1r3rsa6szps7mvvpqyw0mg16zn36x451dxq4nmn2l5ds5cp1f017"; + }; + + phases = [ "unpackPhase" "installPhase" ]; + + nativeBuildInputs = [ dpkg ]; + + unpackPhase = "dpkg-deb -x $src ."; + + installPhase = '' + mkdir -p $out + + cp -R usr/* $out + + patchelf \ + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath "${rpath}" $out/bin/brave + ''; + + meta = with stdenv.lib; { + homepage = "https://brave.com/"; + description = "Privacy-oriented browser for Desktop and Laptop computers"; + longDescription = '' + Brave browser blocks the ads and trackers that slow you down, + chew up your bandwidth, and invade your privacy. Brave lets you + contribute to your favorite creators automatically. + ''; + license = licenses.mpl20; + maintainers = [ maintainers.uskudnik ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23734344323..cfbc6687f9d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15822,6 +15822,8 @@ with pkgs; brackets = callPackage ../applications/editors/brackets { gconf = gnome2.GConf; }; + brave = callPackage ../applications/networking/browsers/brave { }; + notmuch-bower = callPackage ../applications/networking/mailreaders/notmuch-bower { }; bristol = callPackage ../applications/audio/bristol { };