1{
2 stdenv,
3 fetchFromGitHub,
4 nix-update-source,
5 lib,
6 python3,
7 which,
8 runtimeShell,
9 pylint,
10}:
11stdenv.mkDerivation rec {
12 version = "0.9.2";
13 src = fetchFromGitHub {
14 hash = "sha256-bV5HauM0xmRI/9Pxp1cYLPLA8PbFvPER2y4mAMmgchs=";
15 owner = "timbertson";
16 repo = "gup";
17 rev = "version-${version}";
18 };
19 pname = "gup";
20 nativeBuildInputs = [
21 python3
22 which
23 pylint
24 ];
25 buildInputs = [ python3 ];
26 strictDeps = true;
27 buildPhase = "make python";
28 installPhase = ''
29 mkdir $out
30 cp -r python/bin $out/bin
31 '';
32 passthru.updateScript = [
33 runtimeShell
34 "-c"
35 ''
36 set -e
37 echo
38 cd ${toString ./.}
39 ${nix-update-source}/bin/nix-update-source \
40 --prompt version \
41 --replace-attr version \
42 --set owner timbertson \
43 --set repo gup \
44 --set type fetchFromGitHub \
45 --set rev 'version-{version}' \
46 --nix-literal rev 'version-''${version}'\
47 --modify-nix default.nix
48 ''
49 ];
50 meta = {
51 inherit (src.meta) homepage;
52 description = "Better make, inspired by djb's redo";
53 license = lib.licenses.lgpl2Plus;
54 maintainers = [ lib.maintainers.timbertson ];
55 platforms = lib.platforms.all;
56 };
57}