Skip to content

Commit

Permalink
Merge pull request #256416 from rhysmdnz/edge-updates
Browse files Browse the repository at this point in the history
microsoft-edge: Use pname and make update script CWD independent
  • Loading branch information
wegank authored Sep 24, 2023
2 parents 3bdc587 + 9f6c155 commit a175fda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ let
in

stdenv.mkDerivation rec {
name="${baseName}-${channel}-${version}";
pname="${baseName}-${channel}";
inherit version;

src = fetchurl {
url = "https://packages.microsoft.com/repos/edge/pool/main/m/${baseName}-${channel}/${baseName}-${channel}_${version}-${revision}_amd64.deb";
Expand Down Expand Up @@ -181,12 +182,14 @@ stdenv.mkDerivation rec {
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.pname}-${gtk3.version}"
'';

passthru.updateScript = ./update.py;

meta = with lib; {
homepage = "https://www.microsoft.com/en-us/edge";
description = "The web browser from Microsoft";
license = licenses.unfree;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ zanculmarktum kuwii ];
maintainers = with maintainers; [ zanculmarktum kuwii rhysmdnz ];
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
from collections import OrderedDict
from debian.deb822 import Packages
from debian.debian_support import Version
from os.path import abspath, dirname

PIN_PATH = dirname(abspath(__file__)) + '/default.nix'

def packages():
packages_url = 'https://packages.microsoft.com/repos/edge/dists/stable/main/binary-amd64/Packages'
Expand Down Expand Up @@ -60,7 +63,7 @@ def write_expression():
latest = latest_packages(packages())
channel_strs = nix_expressions(latest)
nix_expr = '{\n' + textwrap.indent('\n'.join(channel_strs), ' ') + '\n}\n'
with open('default.nix', 'w') as f:
with open(PIN_PATH, 'w') as f:
f.write(nix_expr)


Expand Down

0 comments on commit a175fda

Please sign in to comment.