commit 0fc08474e751c545e79fb2c5b84b3804849f52e0
parent 417e443ed324838c7810a9f90dc51c5e3e2a201b
Author: Daniel Barlow <dan@telent.net>
Date: Sat, 19 Mar 2022 21:39:00 +0000
add an icon
Diffstat:
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/just/default.nix b/just/default.nix
@@ -1,5 +1,6 @@
{ stdenv
, callPackage
+, copyDesktopItems
, fetchFromGitHub
, fetchurl
, glib-networking
@@ -10,10 +11,12 @@
, librsvg
, lua53Packages
, lua5_3
+, makeDesktopItem
, makeWrapper
, writeText
}:
-let fennel = fetchurl {
+let pname = "just";
+ fennel = fetchurl {
name = "fennel.lua";
url = "https://fennel-lang.org/downloads/fennel-1.0.0";
hash = "sha256:1nha32yilzagfwrs44hc763jgwxd700kaik1is7x7lsjjvkgapw7";
@@ -28,19 +31,31 @@ let fennel = fetchurl {
readline
]);
in stdenv.mkDerivation {
- pname = "just";
+ inherit pname fennel;
version = "0.1";
src =./.;
- inherit fennel;
# this will have to go into a makeWrapper thingy when we
# get to the point of producing an actual package
GIO_EXTRA_MODULES = "${glib-networking}/lib/gio/modules";
+
buildInputs = [ lua gtk3 webkitgtk gobject-introspection.dev
glib-networking ];
- nativeBuildInputs = [ lua makeWrapper ];
+ nativeBuildInputs = [ lua makeWrapper copyDesktopItems ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+ desktopItems = [
+ (makeDesktopItem rec {
+ desktopName = "Just Browsing";
+ name = pname;
+ exec = pname;
+ categories = "Network;" ;
+ icon = ./just.png;
+ genericName = "Web browser";
+ })
+ ];
+
postInstall = ''
wrapProgram $out/bin/just --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH"
'';
diff --git a/just/just.png b/just/just.png
Binary files differ.