diff --git a/just/default.nix b/just/default.nix index 2506531..5e8e157 100644 --- 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 new file mode 100644 index 0000000..18ef4b0 Binary files /dev/null and b/just/just.png differ