Merge pull request #256416 from rhysmdnz/edge-updates

microsoft-edge: Use pname and make update script CWD independent
This commit is contained in:
Weijia Wang 2023-09-24 20:13:07 +02:00 committed by GitHub
commit a175fdabc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -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";
@ -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 ];
};
}

View file

@ -8,6 +8,9 @@ from urllib import request
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'
@ -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)