Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phoenix & Dove: init at 2025.02.01.1 #380398

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions pkgs/by-name/do/dove/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
lib,
fetchzip,
stdenvNoCC,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dove";
version = "2025.02.01.1";

src = fetchzip {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use fetchFromGitea.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will fetch the whole repo with all the build scripts and more, whereas I'm only interested in the few files in the zip archive. Is that ok?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also fetches the zip.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the current code does not fetch the zip of the repo, it only fetch a zip inside the repo that contains only necessary files.

url = "https://codeberg.org/celenity/Dove/raw/tag/${finalAttrs.version}/archives/dove.zip";
hash = "sha256-tAIWO/I9k/TE4jyGS3vHsehZFszJp03ay/tcK+PVnLI=";
stripRoot = false;
# general.config.filename is hard-coded to mozilla.cfg in wrapFirefox, so removing this setting:
postFetch = ''
sed -i '/general.config.filename/d' $out/dove.cfg $out/prefs/dove.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find this.

Copy link
Contributor Author

@jbgi jbgi Feb 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'';
};

dontUnpack = true;

installPhase = ''
runHook preInstall
mkdir $out
cp -r $src/policies.json $src/dove.cfg $src/prefs $out/
runHook postInstall
'';

passthru.updateScript = nix-update-script { };

meta = {
description = "A suite of configurations & advanced modifications for Mozilla Thunderbird with a focus on privacy, security, freedom, & usability";
homepage = "https://dove.celenity.dev/";
license = lib.licenses.gpl3Plus;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this gpl3Plus instead of gpl3Only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoward the end of the license there is is this mention:

Phoenix
Copyright (C) 2024 Magnesium1062

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the

END OF TERMS AND CONDITIONS

line? The GPL license itself should not be modified as this. The license header should be added in the source code instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's probably not orthodox, for me the intent is GPL3+ but I'm not a lawyer. I can open an issue to get them add proper headers.

maintainers = with lib.maintainers; [
jbgi
];
platforms = lib.platforms.all;
};
})
44 changes: 44 additions & 0 deletions pkgs/by-name/ph/phoenix/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
lib,
fetchzip,
stdenvNoCC,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "phoenix";
version = "2025.02.01.1";

src = fetchzip {
url = "https://codeberg.org/celenity/Phoenix/raw/tag/${finalAttrs.version}/archives/phoenix.zip";
hash = "sha256-+eIcobl1OxM3P7DKeB0Pz1qdHNr2zXgnNBQ1SMaijEA=";
stripRoot = false;
# general.config.filename is hard-coded to mozilla.cfg in wrapFirefox, so removing this setting:
postFetch = ''
sed -i '/general.config.filename/d' $out/phoenix.cfg $out/prefs/phoenix-desktop.js
'';
};

dontUnpack = true;

installPhase = ''
runHook preInstall

mkdir $out
cp -r $src/userjs/linux $out/userjs
cp -r $src/policies.json $src/phoenix.cfg $src/prefs $src/configs $out/

runHook postInstall
'';

passthru.updateScript = nix-update-script { };

meta = {
description = "A suite of configurations & advanced modifications for Mozilla Firefox with a focus on privacy, security, freedom, & usability";
homepage = "https://phoenix.celenity.dev";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
jbgi
];
platforms = lib.platforms.all;
};
})