Summary Files Commits Branches @commit @diff @stats
path: root / packages / cmyflix / default.nix
blob: f2c010ba31abe2a9be40297d52de28b21d51900a (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
31
32
33
34
35
{
  stdenv,
  fetchFromGitHub,
  libbsd,
  cjson,
  curl,
  ...
}:
stdenv.mkDerivation rec {
  pname = "cmyflix";
  version = "0.25";

  src = fetchFromGitHub {
    owner = "farfalleflickan";
    repo = pname;
    tag = version;
    hash = "sha256-GjVxgtlNOPj4RdQAbKxfpJvcVb4q7D9YiWqfM2NJuiA=";
  };

  buildInputs = [
    libbsd
    cjson
    curl
  ];

  postPatch = ''
    sed -i 's/$(shell id -u)/0/g' Makefile
  '';

  makeFlags = [ "DESTDIR=$(out)/" ];

  postInstall = ''
    cp -r $out/usr/local/bin/ $out/bin
  '';
}