pom

A simple pomodoro app, suitable for running in a tmux pane.
git clone git://git.jtobin.io/pom.git
Log | Files | Refs | README | git.jtobin.io

flake.nix (1109B)


      1 {
      2   description = "A simple pomodoro timer for the terminal.";
      3 
      4   inputs = {
      5     nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
      6     flake-utils.url = "github:numtide/flake-utils";
      7   };
      8 
      9   outputs = { self, nixpkgs, flake-utils }:
     10     flake-utils.lib.eachDefaultSystem (system:
     11       let
     12         exe = "pom";
     13 
     14         pkgs  = import nixpkgs { inherit system; };
     15         hlib  = pkgs.haskell.lib;
     16         hpkgs = pkgs.haskellPackages.extend (new: old: {
     17           ${exe} = new.callCabal2nix exe ./. { };
     18         });
     19 
     20         ghc   = hpkgs.ghc;
     21         cabal = hpkgs.cabal-install;
     22       in
     23         {
     24           packages.default = hlib.justStaticExecutables hpkgs.${exe};
     25 
     26           devShells.default = hpkgs.shellFor {
     27             packages = p: [ p.${exe} ];
     28 
     29             buildInputs = [
     30               cabal
     31             ];
     32 
     33             shellHook = ''
     34               PS1="[${exe}] \w$ "
     35               echo "entering ${system} shell, using"
     36               echo "ghc:   $(${ghc}/bin/ghc --version)"
     37               echo "cabal: $(${cabal}/bin/cabal --version)"
     38             '';
     39           };
     40         }
     41       );
     42 }