2021-04-05 15:23:46 +00:00
|
|
|
{ stdenv, fetchFromGitHub, nix-update-source, lib, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, which, runtimeShell, pychecker ? null }:
|
|
|
|
stdenv.mkDerivation rec {
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "0.8.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "timbertson";
|
|
|
|
repo = "gup";
|
2021-06-28 23:13:55 +00:00
|
|
|
rev = "version-${version}";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "0b8q9mrr7b9silwc4mp733j1z18g4lp6ppdi8p2rxzgb2fb4bkvp";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
pname = "gup";
|
2021-04-05 15:23:46 +00:00
|
|
|
nativeBuildInputs = [ python3 which pychecker ];
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
SKIP_PYCHECKER = pychecker == null;
|
|
|
|
buildPhase = "make python";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp -r python/bin $out/bin
|
|
|
|
'';
|
2021-06-28 23:13:55 +00:00
|
|
|
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}' \
|
|
|
|
--modify-nix default.nix
|
|
|
|
''
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "A better make, inspired by djb's redo";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.lgpl2Plus;
|
|
|
|
maintainers = [ lib.maintainers.timbertson ];
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|