citadel

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

default.nix (464B)


      1 { pkgs ? import <nixpkgs> {}, stdenv ? pkgs.stdenv, fetchurl ? pkgs.fetchurl, 
      2   bash ? pkgs.bash, pup ? pkgs.pup, writeScript ? pkgs.writeScript }:
      3 stdenv.mkDerivation rec {
      4   pname = "rsslink";
      5   version = "0.1";
      6 
      7   src = writeScript "rsslink" ''
      8     #!${bash}/bin/bash
      9     ${pup}/bin/pup 'link[type="application/rss+xml"] attr{href}' | head -n1
     10   '';
     11 
     12   phases = ["installPhase"];
     13 
     14   installPhase = ''
     15     mkdir -p $out/bin
     16     cp $src $out/bin/rsslink
     17   '';
     18 }