summary refs log tree commit diff
path: root/pkgs/tools/misc/fpp/default.nix
blob: 6271eb599b589552ec6b62d40f745829ab6ef87c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchFromGitHub, python27 }:

stdenv.mkDerivation rec {
  name = "fpp-${version}";
  version = "0.7.2";

  src = fetchFromGitHub {
    owner = "facebook";
    repo = "PathPicker";
    rev = version;
    sha256 = "03n8sc2fvs2vk46jv6qfkjbyqz85yxnphvabji7qnmd3jv631w47";
  };

  postPatch = ''
    substituteInPlace fpp --replace 'PYTHONCMD="python"' 'PYTHONCMD="${python27.interpreter}"'
  '';

  installPhase = ''
    mkdir -p $out/share/fpp $out/bin
    cp -r fpp src $out/share/fpp
    ln -s $out/share/fpp/fpp $out/bin/fpp
  '';

  meta = {
    description = "CLI program that accepts piped input and presents files for selection";
    homepage = https://facebook.github.io/PathPicker/;
    license = stdenv.lib.licenses.bsd3;
    platforms = stdenv.lib.platforms.all;
  };
}