about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--fun/uggc/default.nix29
-rw-r--r--fun/uggc/uggc.desktop2
-rw-r--r--users/tazjin/nixos/frog/default.nix3
3 files changed, 20 insertions, 14 deletions
diff --git a/fun/uggc/default.nix b/fun/uggc/default.nix
index 398e7b6ffe6c..49160071f586 100644
--- a/fun/uggc/default.nix
+++ b/fun/uggc/default.nix
@@ -1,14 +1,19 @@
-{ depot, ... }@args:
+{ depot, pkgs, ... }@args:
 
 let
-  gopkgs = depot.third_party.gopkgs;
-in
-depot.nix.buildGo.program {
-  name = "uggc";
-  srcs = [
-    ./main.go
-  ];
-  deps = [
-    gopkgs."github.com".pkg.browser.gopkg
-  ];
-}
+  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
+  '';
+})
diff --git a/fun/uggc/uggc.desktop b/fun/uggc/uggc.desktop
index 5203277f4ab4..c4eeff7f5897 100644
--- a/fun/uggc/uggc.desktop
+++ b/fun/uggc/uggc.desktop
@@ -1,7 +1,7 @@
 [Desktop Entry]
 Type=Application
 Name=Rot13 URL Handler
-Exec=uggc %u
+Exec=@out@/bin/uggc
 StartupNotify=false
 MimeType=x-scheme-handler/uggc;
 MimeType=x-scheme-handler/uggcf;
diff --git a/users/tazjin/nixos/frog/default.nix b/users/tazjin/nixos/frog/default.nix
index 72b1c9ed3612..5c694380d44b 100644
--- a/users/tazjin/nixos/frog/default.nix
+++ b/users/tazjin/nixos/frog/default.nix
@@ -189,9 +189,10 @@ in depot.lib.fix(self: {
   environment.systemPackages =
     # programs from the depot
     (with depot; [
+      frogEmacs
       fun.idual.script
+      fun.uggc
       lieer
-      frogEmacs
       ops.kontemplate
       third_party.ffmpeg
       third_party.git