Repository navigation
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I made nix derivation to install this to my nixos, however it does not work correctly.
URL link seems not passed to this app, so app open home directory instead of link.
Here is what happened.
Kooha-2024-01-30-19-53-53.webm
And, here is my derivation
{ stdenv
, lib
, fetchzip
, autoPatchelfHook
, makeWrapper
, cairo
, gdk-pixbuf
, gtk3
}:
stdenv.mkDerivation rec {
pname = "browsers";
version = "0.5.0";
src = fetchzip {
url = "https://github.com/Browsers-software/browsers/releases/download/${version}/browsers_linux.tar.gz";
hash = "sha256-5BiJ8G77kLlLZr7Ut0jY/hp4zncWsWO55vyCSp6NPqk=";
stripRoot=false;
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
buildInputs = [
stdenv.cc.cc.lib
cairo
gdk-pixbuf
gtk3
];
installPhase = ''
mkdir -p $out/{bin,share/applications,lib}
mv x86_64/${pname} $out/bin
install -m 444 \
-D software.Browsers.template.desktop \
-t $out/share/applications
substituteInPlace \
$out/share/applications/software.Browsers.template.desktop \
--replace 'Exec=€ExecCommand€' 'Exec=${pname}'
cp -r lib $out
for size in 16 32 128 256 512; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
cp icons/"$size"x"$size"/software.Browsers.png $out/share/icons/hicolor/"$size"x"$size"/apps/software.Browsers.png
done
'';
postFixup = ''
wrapProgram $out/bin/browsers \
--prefix LD_LIBRARY_PATH : $out/lib
'';
meta = with lib; {
description = "Open the right browser at the right time";
homepage = "https://github.com/Browsers-software/browsers";
changelog = "https://github.com/Browsers-software/browsers/blob/${src.rev}/CHANGELOG.md";
license = with licenses; [ asl20 mit ];
maintainers = with maintainers; [ ];
mainProgram = "browsers";
};
}
It is possible that I have made a mistake somewhere in my derivation, sorry if I did ....
Describe the solution you'd like
A clear and concise description of what you want to happen.
So, if I didn't make mistake, I hope support NixOS.
I would be more than happy to ship it to nixpkgs.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Metadata
Metadata
Assignees
Labels
Type
Fields
Browser
Activity
liias commentedon Jan 30, 2024
Hey there, @RAVENz46, I appreciate that someone does the nix package!
I don't have experience with nix packages, but can see the error in modifiying the
.desktopfile:Please change
to
The
%uis part of .desktop specification, and is actually placeholder for url that desktop environment substitutes.liias commentedon Jan 30, 2024
Another issue I can see from the video is that none of the browsers are identified as specific browser types, i.e no browser profiles are shown.
There can be two reasons for that:
<app-binary-dir>/../resources/lib/application-repository.tomlis not found (be aware that the "lib" here does not refer to standard linux lib folders, and is just a subdirectory for resource files - I might need to rename it to remove confusion)..desktopfiles are not found/named in a standard way for the other browsersRAVENz46 commentedon Jan 30, 2024
Yes! Now, link correctly passed.
I'm still beginner of nix, so IDK how/able to fix these.
Anyway, I'm fine with it so I close this issue. Thank you!
RAVENz46 commentedon Jan 30, 2024
I changed
$out/libto$out/resources/libthen, it seems work cause chromium and firefox's name placed bit higher.Final result
liias commentedon Jan 30, 2024
I corrected my previous comment about resources location. So the tree should be basically like this:
It's also safe to add symlink to the binary if you need it somewhere else.
I can see in your screenshot, that profile names are still not shown, so likely something is still missing (also need to refresh apps from the 3-dot menu).
RAVENz46 commentedon Jan 31, 2024
Thanks again for all your help.
I add i18n directory, now settings and browser profile seems fine.
Icon directory may be unnecessary under resourses dir, this is because nix specific thing.
But I found something should fix, so let me ask you.
Kooha-2024-01-31-11-41-41.webm
liias commentedon Jan 31, 2024
Awesome! Only the 512x512 icon is used under resources dir actually, to be shown in About dialog.
FYI, be aware, that in next release
resources/lib/will be renamed toresources/repository/Actually, it's designed that dock icon would never be shown (like when you right click or alt+tab, you don't see icons for those dialogs), hopefully the fact that it is shown is small enough to ignore for now ;)
There's a very simple filter right now - if the .desktop file is named as
software.Browsers.desktop, then it will skip it from the list.Bad design from my side - you need to right click with your mouse on the browser and click "Hide"
RAVENz46 commentedon Jan 31, 2024
Okay, now almost everything fine.
Thanks!!!