citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

default.nix (517B)


      1 { pkgs        ? import <nixpkgs> {},
      2   stdenv      ? pkgs.stdenv,
      3   bash        ? pkgs.bash,
      4   zenity      ? pkgs.gnome.zenity,
      5   writeScript ? pkgs.writeScript
      6 }:
      7 stdenv.mkDerivation rec {
      8   pname = "hoogle-zen";
      9   version = "0.1";
     10 
     11   src = writeScript pname ''
     12     #!${bash}/bin/bash
     13     q="$(${zenity}/bin/zenity --entry --text=query:)"
     14     /home/jb55/bin/open "http://localhost:8088/?hoogle=$q"
     15   '';
     16 
     17   phases = ["installPhase"];
     18 
     19   installPhase = ''
     20     mkdir -p $out/bin
     21     cp $src $out/bin/${pname}
     22   '';
     23 }
     24