-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
firefoxpwa: init at 2.7.3 #215905
firefoxpwa: init at 2.7.3 #215905
Conversation
57bafcd
to
5049e6c
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/1819 |
5049e6c
to
40c7f3c
Compare
40c7f3c
to
6d6cf1d
Compare
5bf1565
to
60f28e4
Compare
@@ -0,0 +1,90 @@ | |||
# <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firefox-pwa> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=firefox-pwa> |
# replace the version in the lockfile, otherwise Nix complains | ||
sed -zi 's;name = "firefoxpwa"\nversion = "0.0.0";name = "firefoxpwa"\nversion = "${version}";' Cargo.lock | ||
# replace the version number in the profile template files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# replace the version in the lockfile, otherwise Nix complains | |
sed -zi 's;name = "firefoxpwa"\nversion = "0.0.0";name = "firefoxpwa"\nversion = "${version}";' Cargo.lock | |
# replace the version number in the profile template files | |
sed -zi 's;name = "firefoxpwa"\nversion = "0.0.0";name = "firefoxpwa"\nversion = "${version}";' Cargo.lock |
comments should explain the reasons behind a line, not what it is doing and the first comment is obvious.
# Completions | ||
install -Dm755 $target/completions/firefoxpwa.bash $out/share/bash-completion/completions/firefoxpwa | ||
install -Dm755 $target/completions/firefoxpwa.fish $out/share/fish/vendor_completions.d/firefoxpwa.fish | ||
install -Dm755 $target/completions/_firefoxpwa $out/share/zsh/vendor-completions/_firefoxpwa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use installCompletion
60f28e4
to
6decb5b
Compare
doCheck = false; | ||
|
||
nativeBuildInputs = [ pkg-config installShellFiles ]; | ||
buildInputs = [ openssl.dev openssl ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks fishy. Why do we need both?
nativeBuildInputs = [ pkg-config installShellFiles ]; | ||
buildInputs = [ openssl.dev openssl ]; | ||
|
||
preConfigure = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this in postPatch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No or cargo complains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means that our cargo.lock is out of date and needs to be fixed, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildRustPackage
take the Cargo.lock
from upstream, so the problem is there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because I don't want to update the version
in Cargo.toml
every time before I release a new version. So, Cargo.toml
in the repository only sets version = "0.0.0"
and the actual version is then automatically set when building and releasing the package (in GitHub Actions for the official packages and here for Nix package).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should patch that version to be correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't we already doing this?
installShellCompletion --bash $target/completions/firefoxpwa.bash | ||
installShellCompletion --fish $target/completions/firefoxpwa.fish | ||
installShellCompletion --zsh $target/completions/_firefoxpwa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
installShellCompletion --bash $target/completions/firefoxpwa.bash | |
installShellCompletion --fish $target/completions/firefoxpwa.fish | |
installShellCompletion --zsh $target/completions/_firefoxpwa | |
installShellCompletion --cmd firefoxpwa \ | |
--bash $target/completions/firefoxpwa.bash \ | |
--fish $target/completions/firefoxpwa.fish \ | |
--zsh $target/completions/_firefoxpwa |
Hi, so I managed to make the runtime-patched files writable via an upstream PR, I hope it will be accepted! Now, it seems that the updater is broken, I guess the binary should be patched-elf to work with NixOS, but don't you think it could be interesting to wrap Also, the sound and notifications seem to be broken. Can you reproduce? Do you think Thanks! |
@@ -25,9 +26,16 @@ let | |||
pname = "${pname}-unwrapped"; | |||
|
|||
src = "${source}/${dir}"; | |||
cargoSha256 = "sha256-G8CxvANwjh8rCuBtQbO0UseQTg40EL0eqW7GG/XTpOg="; | |||
cargoLock = { | |||
lockFile = "${unwrapped.src}/Cargo.lock"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this triggers IFD which is not allowed
|
||
nativeBuildInputs = [ pkg-config installShellFiles ]; | ||
nativeBuildInputs = [ pkg-config installShellFiles bintools ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bintools should be part of stdenv
On 18/04/23 17:03, Sandro ***@***.***> wrote:
bintools should be part of stdenv
Without `bintools` the `ar` command is not found
|
Hi, it builds for me on x86_64-linux, what is your architecture? It seems that you need to build |
, fetchFromGitHub | ||
, openssl | ||
, symlinkJoin | ||
, buildFHSUserEnv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think buildFHSUserEnv
has been renamed buildFHSEnv
.
Also it seems like the FHS env script fails since the latest updates for me: the Firefox window does not open and there is no error. If I use the unwrapped binary, it works!
The error is in the build of |
I think we want to use the ar in the AR env. |
After replacing
|
This comment was marked as outdated.
This comment was marked as outdated.
06450c4
to
91627f2
Compare
Ok the problem was a missing bzip2 dependency. Added that and updated to 2.7.3 |
Co-authored-by: Camille M. <[email protected]>
Hi, Check out my PR, I made the update and created a test! |
More up to date here: #263404 |
Description of changes
Fixes filips123/PWAsForFirefox#204
Fixes #186961
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)