NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.14k stars 14.17k forks source link

Package request: vivaldi-snapshots #330528

Open LinuxMason opened 3 months ago

LinuxMason commented 3 months ago

Project description

Vivaldi Snapshots is the unstable or otherwise known as bleeding edge version of Vivaldi browser.

Metadata


Add a :

Lippiece commented 1 month ago

I concur with the notion, but there's already a isSnapshot override for vivaldi package. It's unclear, however, how to properly use it, as it just makes it to try to fetch the same stable version with "unstable" suffix, which fails.

Error

``` error: builder for '/nix/store/2hm3vg1qmbv57fpvm6zf8mdlrsy0dw5i-vivaldi-snapshot_6.9.3447.41-1_amd64.deb.drv' failed with exit code 1; last 7 log lines: > > trying https://downloads.vivaldi.com/snapshot/vivaldi-snapshot_6.9.3447.41-1_amd64.deb > % Total % Received % Xferd Average Speed Time Time Time Current > Dload Upload Total Spent Left Speed > 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 > curl: (22) The requested URL returned error: 404 > error: cannot download vivaldi-snapshot_6.9.3447.41-1_amd64.deb from any mirror ```

LinuxMason commented 1 month ago

I concur with the notion, but there's already a isSnapshot override for vivaldi package. It's unclear, however, how to properly use it, as it just makes it to try to fetch the same stable version with "unstable" suffix, which fails.

Error

error: builder for '/nix/store/2hm3vg1qmbv57fpvm6zf8mdlrsy0dw5i-vivaldi-snapshot_6.9.3447.41-1_amd64.deb.drv' failed with exit code 1;
       last 7 log lines:
       >
       > trying https://downloads.vivaldi.com/snapshot/vivaldi-snapshot_6.9.3447.41-1_amd64.deb
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 404
       > error: cannot download vivaldi-snapshot_6.9.3447.41-1_amd64.deb from any mirror

Can you link me to that override?

Lippiece commented 1 month ago

Can you link me to that override?

https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/browsers/vivaldi/default.nix#L14C3-L14C13

It was added 5 years ago, the versioning was probably different.

LinuxMason commented 1 week ago

Until an official nixpkg for vivaldi-snapshots is rolled out, you can override the current stable vivaldi nixpkg with the following:

home.packages =
  let
        vivaldi =
          (pkgs.vivaldi.override {
            isSnapshot = true;
          }).overrideAttrs
            (_: {
              src =
                let
                  version = "7.0.3495.5";
                in
                pkgs.fetchurl {
                  url = "https://downloads.vivaldi.com/snapshot/vivaldi-snapshot_${version}-1_amd64.deb";
                  hash = "sha256-Y+weoZWFlnoGXa31bDmVMcXvU5fd6gX7zd7r2VKPZLk=";
                };
            });
  in
  [ vivaldi ]

Note: If you are new to overrides, be sure to update the version number line and the base64 hash line with the latest version's info.

Full credit for this override goes to https://github.com/letThemPlay