about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/build-managers/gup/default.nix
blob: dcc0c3aef90c3c29b5dcc562028a750d66e1af81 (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
36
37
38
39
40
{ stdenv, fetchFromGitHub, nix-update-source, lib, python
, which, runtimeShell, pychecker ? null }:
stdenv.mkDerivation rec {
  version = "0.7.0";
  src = fetchFromGitHub {
    owner = "timbertson";
    repo = "gup";
    rev = "version-0.7.0";
    sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv";
  };
  pname = "gup";
  buildInputs = lib.remove null [ python which pychecker ];
  SKIP_PYCHECKER = pychecker == null;
  buildPhase = "make python";
  installPhase = ''
    mkdir $out
    cp -r python/bin $out/bin
  '';
  passthru.updateScript = ''
    #!${runtimeShell}
    set -e
    echo
    cd ${toString ./.}
    ${nix-update-source}/bin/nix-update-source \
      --prompt version \
      --replace-attr version \
      --set owner timbertson \
      --set repo gup \
      --set type fetchFromGitHub \
      --set rev 'version-{version}' \
      --modify-nix default.nix
  '';
  meta = {
    inherit (src.meta) homepage;
    description = "A better make, inspired by djb's redo";
    license = lib.licenses.lgpl2Plus;
    maintainers = [ lib.maintainers.timbertson ];
    platforms = lib.platforms.all;
  };
}