add an icon

phoen
Daniel Barlow 2022-03-19 21:39:00 +00:00
parent 417e443ed3
commit 0fc08474e7
2 changed files with 19 additions and 4 deletions

View File

@ -1,5 +1,6 @@
{ stdenv { stdenv
, callPackage , callPackage
, copyDesktopItems
, fetchFromGitHub , fetchFromGitHub
, fetchurl , fetchurl
, glib-networking , glib-networking
@ -10,10 +11,12 @@
, librsvg , librsvg
, lua53Packages , lua53Packages
, lua5_3 , lua5_3
, makeDesktopItem
, makeWrapper , makeWrapper
, writeText , writeText
}: }:
let fennel = fetchurl { let pname = "just";
fennel = fetchurl {
name = "fennel.lua"; name = "fennel.lua";
url = "https://fennel-lang.org/downloads/fennel-1.0.0"; url = "https://fennel-lang.org/downloads/fennel-1.0.0";
hash = "sha256:1nha32yilzagfwrs44hc763jgwxd700kaik1is7x7lsjjvkgapw7"; hash = "sha256:1nha32yilzagfwrs44hc763jgwxd700kaik1is7x7lsjjvkgapw7";
@ -28,19 +31,31 @@ let fennel = fetchurl {
readline readline
]); ]);
in stdenv.mkDerivation { in stdenv.mkDerivation {
pname = "just"; inherit pname fennel;
version = "0.1"; version = "0.1";
src =./.; src =./.;
inherit fennel;
# this will have to go into a makeWrapper thingy when we # this will have to go into a makeWrapper thingy when we
# get to the point of producing an actual package # get to the point of producing an actual package
GIO_EXTRA_MODULES = "${glib-networking}/lib/gio/modules"; GIO_EXTRA_MODULES = "${glib-networking}/lib/gio/modules";
buildInputs = [ lua gtk3 webkitgtk gobject-introspection.dev buildInputs = [ lua gtk3 webkitgtk gobject-introspection.dev
glib-networking ]; glib-networking ];
nativeBuildInputs = [ lua makeWrapper ]; nativeBuildInputs = [ lua makeWrapper copyDesktopItems ];
makeFlags = [ "PREFIX=${placeholder "out"}" ]; makeFlags = [ "PREFIX=${placeholder "out"}" ];
desktopItems = [
(makeDesktopItem rec {
desktopName = "Just Browsing";
name = pname;
exec = pname;
categories = "Network;" ;
icon = ./just.png;
genericName = "Web browser";
})
];
postInstall = '' postInstall = ''
wrapProgram $out/bin/just --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH" wrapProgram $out/bin/just --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH"
''; '';

BIN
just/just.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB