citadel

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

commit 305f7e5d0745db8d7bb7796bce767851dc8769a5
parent 0478ff07f131e2a53c2148c98d621e8fda0dfcba
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 21 Apr 2021 15:52:01 -0700

jb55pkgs: hoogle-zen

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mjb55pkgs/default.nix | 1+
Ajb55pkgs/pkgs/hoogle-zen/default.nix | 24++++++++++++++++++++++++
Mnix-config/environment/desktop/default.nix | 1+
3 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/jb55pkgs/default.nix b/jb55pkgs/default.nix @@ -27,6 +27,7 @@ in rec { define = callPackage ./pkgs/define { }; rsslink = callPackage ./pkgs/rsslink { }; x11-rename = callPackage ./pkgs/x11-rename { }; + hoogle-zen = callPackage ./pkgs/hoogle-zen { }; ratio = fetch-srht { repo = "ratio"; diff --git a/jb55pkgs/pkgs/hoogle-zen/default.nix b/jb55pkgs/pkgs/hoogle-zen/default.nix @@ -0,0 +1,24 @@ +{ pkgs ? import <nixpkgs> {}, + stdenv ? pkgs.stdenv, + bash ? pkgs.bash, + zenity ? pkgs.gnome3.zenity, + writeScript ? pkgs.writeScript +}: +stdenv.mkDerivation rec { + pname = "hoogle-zen"; + version = "0.1"; + + src = writeScript pname '' + #!${bash}/bin/bash + q="$(${zenity}/bin/zenity --entry --text=query:)" + /home/jb55/bin/open "http://localhost:8088/?hoogle=$q" + ''; + + phases = ["installPhase"]; + + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/${pname} + ''; +} + diff --git a/nix-config/environment/desktop/default.nix b/nix-config/environment/desktop/default.nix @@ -20,6 +20,7 @@ let gtk2rc = pkgs.writeText "gtk2rc" '' cmdtree zoom-link-opener x11-rename + hoogle-zen viscal ];