blob: ca8c6a6a59fefd1b7d51ca217c7d9d78b25764a1 (
plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{
stdenv,
fetchFromGitHub,
nix-update-source,
lib,
python3,
which,
runtimeShell,
pylint,
}:
stdenv.mkDerivation rec {
version = "0.9.2";
src = fetchFromGitHub {
hash = "sha256-bV5HauM0xmRI/9Pxp1cYLPLA8PbFvPER2y4mAMmgchs=";
owner = "timbertson";
repo = "gup";
rev = "version-${version}";
};
pname = "gup";
nativeBuildInputs = [
python3
which
pylint
];
buildInputs = [ python3 ];
strictDeps = true;
buildPhase = "make python";
installPhase = ''
mkdir $out
cp -r python/bin $out/bin
'';
passthru.updateScript = [
runtimeShell
"-c"
''
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}' \
--nix-literal rev 'version-''${version}'\
--modify-nix default.nix
''
];
meta = {
inherit (src.meta) homepage;
description = "Better make, inspired by djb's redo";
license = lib.licenses.lgpl2Plus;
maintainers = [ lib.maintainers.timbertson ];
platforms = lib.platforms.all;
};
}
|