eufon

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

default.nix (1380B)


      1 { stdenv
      2 , callPackage
      3 , copyDesktopItems
      4 , fetchFromGitHub
      5 , fetchurl
      6 , glib-networking
      7 , gobject-introspection
      8 , gtk3
      9 , gnome3
     10 , lib
     11 , librsvg
     12 , lua53Packages
     13 , lua5_3
     14 , makeDesktopItem
     15 , makeWrapper
     16 , writeText
     17 }:
     18 let pname = "just";
     19     fennel = fetchurl {
     20       name = "fennel.lua";
     21       url = "https://fennel-lang.org/downloads/fennel-1.0.0";
     22       hash = "sha256:1nha32yilzagfwrs44hc763jgwxd700kaik1is7x7lsjjvkgapw7";
     23     };
     24     webkitgtk = gnome3.webkitgtk;
     25 
     26     lua = lua5_3.withPackages (ps: with ps; [
     27       inspect
     28       lgi
     29       luafilesystem
     30       luaposix
     31       readline
     32     ]);
     33     glib_networking_gio  = "${glib-networking}/lib/gio/modules";
     34 in stdenv.mkDerivation {
     35   inherit pname fennel;
     36   version = "0.1";
     37   src =./.;
     38 
     39   GIO_EXTRA_MODULES = glib_networking_gio;
     40 
     41   buildInputs = [ lua gtk3 webkitgtk gobject-introspection.dev
     42                   glib-networking  ];
     43   nativeBuildInputs = [ lua makeWrapper copyDesktopItems ];
     44 
     45   makeFlags = [ "PREFIX=${placeholder "out"}" ];
     46 
     47   desktopItems = [
     48     (makeDesktopItem rec {
     49       desktopName = "Just Browsing";
     50       name = pname;
     51       exec = pname;
     52       categories = "Network;" ;
     53       icon = ./just.png;
     54       genericName = "Web browser";
     55     })
     56   ];
     57 
     58   postInstall = ''
     59     wrapProgram $out/bin/just --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH" --prefix GIO_EXTRA_MODULES ":" "${glib_networking_gio}"
     60   '';
     61 }