katja's git: nixfiles

ctucx' nixfiles

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 { lib, mkYarnPackage, ... }:

mkYarnPackage rec {

  src  = ../homebridge;

  packageJSON = ./package.json;
  yarnLock    = ./yarn.lock;

  buildPhase = "true";
  distPhase  = "true";
  installPhase = ''
    mkdir -p $out/bin
    ln -sf ''${node_modules}/.bin/homebridge $out/bin/homebridge
    cat > $out/env <<EOF
    NODE_PATH=''${node_modules}
    EOF
  '';

  meta = with lib; {
    description = "HomeKit support for the impatient.";
    homepage    = "https://github.com/homebridge/homebridge";
    license     = licenses.asl20;
  };

}