This actually registers the desktop entry, so xdg-open etc. start working: tazjin@frog /depot> xdg-open 'uggcf://gjvggre.pbz/alnabgrpu/fgnghf/1272363652679524352' Opening in existing browser session. Change-Id: Ia754cb87470fce2f8d3340d1147f3f01b9914858 Reviewed-on: https://cl.tvl.fyi/c/depot/+/387 Reviewed-by: riking <rikingcoding@gmail.com>
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			430 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			430 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ depot, pkgs, ... }@args:
 | 
						|
 | 
						|
let
 | 
						|
  inherit (pkgs) gopkgs;
 | 
						|
  uggc = depot.nix.buildGo.program {
 | 
						|
    name = "uggc";
 | 
						|
    srcs = [
 | 
						|
      ./main.go
 | 
						|
    ];
 | 
						|
    deps = [
 | 
						|
      gopkgs."github.com".pkg.browser.gopkg
 | 
						|
    ];
 | 
						|
  };
 | 
						|
in uggc.overrideAttrs(old: {
 | 
						|
  buildCommand = old.buildCommand + ''
 | 
						|
    install -D ${./uggc.desktop} $out/share/applications/uggc.desktop
 | 
						|
    sed "s|@out@|$out|g" -i $out/share/applications/uggc.desktop
 | 
						|
  '';
 | 
						|
})
 |