mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
Merge pull request #337248 from squalus/librewolf-settings
librewolf-unwrapped: use settings from submodule
This commit is contained in:
commit
691792358c
@ -33,9 +33,9 @@ rec {
|
||||
cat ${source}/patches/pref-pane/preferences.ftl >> browser/locales/en-US/browser/preferences/preferences.ftl
|
||||
'';
|
||||
|
||||
extraPrefsFiles = [ "${src.settings}/librewolf.cfg" ];
|
||||
extraPrefsFiles = [ "${source}/settings/librewolf.cfg" ];
|
||||
|
||||
extraPoliciesFiles = [ "${src.settings}/distribution/policies.json" ];
|
||||
extraPoliciesFiles = [ "${source}/settings/distribution/policies.json" ];
|
||||
|
||||
extraPassthru = {
|
||||
librewolf = {
|
||||
|
@ -4,10 +4,6 @@
|
||||
"rev": "129.0.1-1",
|
||||
"sha256": "0pvv3v23q31hdjvqi1f3cqfyjrb8dbrrbfwxj2wacak1g0mzbxf4"
|
||||
},
|
||||
"settings": {
|
||||
"rev": "cbcf862e283669b49ecdf985d2d747eca9f4a794",
|
||||
"sha256": "0aisg6l8xhk32wp8d9n532zgkk1nr4y4nsvqa9v8943g6vm4abb7"
|
||||
},
|
||||
"firefox": {
|
||||
"version": "129.0.1",
|
||||
"sha512": "27c463e8277994c62bab85cf0e2f0cea16a9b272694b61fa56a6b3bd7c70d6481774288386094836a54df54c1b1144d61be67f4f5eac418c05479d452221c027"
|
||||
|
@ -10,12 +10,6 @@ in
|
||||
fetchSubmodules = true;
|
||||
inherit (src.source) rev sha256;
|
||||
};
|
||||
settings = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "librewolf";
|
||||
repo = "settings";
|
||||
inherit (src.settings) rev sha256;
|
||||
};
|
||||
firefox = fetchurl {
|
||||
url =
|
||||
"mirror://mozilla/firefox/releases/${src.firefox.version}/source/firefox-${src.firefox.version}.source.tar.xz";
|
||||
|
@ -57,18 +57,9 @@ writeScript "update-librewolf" ''
|
||||
ffHash=$(grep '\.source\.tar\.xz$' "$HOME"/shasums | grep '^[^ ]*' -o)
|
||||
echo "ffHash=$ffHash"
|
||||
|
||||
# upstream does not specify settings rev, so just get the latest. see https://github.com/NixOS/nixpkgs/issues/252276
|
||||
settingsRev=$(curl 'https://codeberg.org/api/v1/repos/librewolf/settings/commits?sha=master&limit=1' | jq -r .[0].sha)
|
||||
echo "settingsRev=$settingsRev"
|
||||
repoUrl=https://codeberg.org/librewolf/settings
|
||||
nix-prefetch-git $repoUrl --quiet --rev $settingsRev > $prefetchOut
|
||||
settingsSha256=$(jq -r .sha256 < $prefetchOut)
|
||||
|
||||
jq ".source.rev = \"$latestTag\"" $srcJson | sponge $srcJson
|
||||
jq ".source.sha256 = \"$srcHash\"" $srcJson | sponge $srcJson
|
||||
jq ".firefox.version = \"$ffVersion\"" $srcJson | sponge $srcJson
|
||||
jq ".firefox.sha512 = \"$ffHash\"" $srcJson | sponge $srcJson
|
||||
jq ".packageVersion = \"$lwVersion\"" $srcJson | sponge $srcJson
|
||||
jq ".settings.rev = \"$settingsRev\"" $srcJson | sponge $srcJson
|
||||
jq ".settings.sha256 = \"$settingsSha256\"" $srcJson | sponge $srcJson
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user