gup: 0.5.5 -> 0.6.0 and derivation update
This commit is contained in:
parent
b984d5d25f
commit
a59c3038cd
@ -1,14 +1,30 @@
|
|||||||
# NOTE: this file is copied from the upstream repository for this package.
|
# NOTE: the `nixpkgs` version of this file is copied from the upstream repository
|
||||||
# Please submit any changes you make here to https://github.com/timbertson/gup/
|
# for this package. Please make any changes to https://github.com/timbertson/gup/
|
||||||
|
|
||||||
{ stdenv, lib, python, which, pychecker ? null }:
|
{ stdenv, lib, pythonPackages }:
|
||||||
{ src, version, meta ? {} }:
|
{ src, version, meta ? {}, passthru ? {}, forceTests ? false }:
|
||||||
|
let
|
||||||
|
testInputs = [
|
||||||
|
pythonPackages.mocktest or null
|
||||||
|
pythonPackages.whichcraft
|
||||||
|
pythonPackages.nose
|
||||||
|
pythonPackages.nose_progressive
|
||||||
|
];
|
||||||
|
pychecker = pythonPackages.pychecker or null;
|
||||||
|
usePychecker = forceTests || pychecker != null;
|
||||||
|
enableTests = forceTests || (lib.all (dep: dep != null) testInputs);
|
||||||
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit src meta;
|
inherit src meta passthru;
|
||||||
name = "gup-${version}";
|
name = "gup-${version}";
|
||||||
buildInputs = lib.remove null [ python which pychecker ];
|
buildInputs = [ pythonPackages.python ]
|
||||||
SKIP_PYCHECKER = pychecker == null;
|
++ (lib.optionals enableTests testInputs)
|
||||||
|
++ (lib.optional usePychecker pychecker)
|
||||||
|
;
|
||||||
|
SKIP_PYCHECKER = !usePychecker;
|
||||||
buildPhase = "make python";
|
buildPhase = "make python";
|
||||||
|
inherit pychecker;
|
||||||
|
testPhase = if enableTests then "make test" else "true";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp -r python/bin $out/bin
|
cp -r python/bin $out/bin
|
||||||
|
6
pkgs/development/tools/build-managers/gup/build.nix.gup
Executable file
6
pkgs/development/tools/build-managers/gup/build.nix.gup
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
if [ -n "${GUP_TARGET:-}" ]; then
|
||||||
|
gup --always
|
||||||
|
fi
|
||||||
|
curl -LSs -o "$1" https://raw.githubusercontent.com/timbertson/gup/master/nix/gup-python.nix
|
@ -1,21 +1,21 @@
|
|||||||
{ stdenv, fetchFromGitHub, lib, python, which }:
|
{ stdenv, fetchFromGitHub, lib, pythonPackages, nix-update-source, curl }:
|
||||||
let
|
|
||||||
version = "0.5.5";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
sha256 = "12yv0j333z6jkaaal8my3jx3k4ml9hq8ldis5zfvr8179d4xah7q";
|
|
||||||
rev = "version-${version}";
|
|
||||||
repo = "gup";
|
|
||||||
owner = "timbertson";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
import ./build.nix
|
import ./build.nix
|
||||||
{ inherit stdenv lib python which; }
|
{ inherit stdenv lib pythonPackages; }
|
||||||
{ inherit src version;
|
{ inherit (nix-update-source.fetch ./src.json) src version;
|
||||||
meta = {
|
meta = {
|
||||||
inherit (src.meta) homepage;
|
homepage = https://github.com/timbertson/gup/;
|
||||||
description = "A better make, inspired by djb's redo";
|
description = "A better make, inspired by djb's redo";
|
||||||
license = stdenv.lib.licenses.lgpl2Plus;
|
license = stdenv.lib.licenses.lgpl2Plus;
|
||||||
maintainers = [ stdenv.lib.maintainers.timbertson ];
|
maintainers = [ stdenv.lib.maintainers.timbertson ];
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = stdenv.lib.platforms.all;
|
||||||
};
|
};
|
||||||
|
passthru = {
|
||||||
|
updateScript = ''
|
||||||
|
set -e
|
||||||
|
echo
|
||||||
|
cd ${toString ./.}
|
||||||
|
${nix-update-source}/bin/nix-update-source --prompt version src.json
|
||||||
|
./build.nix.gup build.nix
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
17
pkgs/development/tools/build-managers/gup/src.json
Normal file
17
pkgs/development/tools/build-managers/gup/src.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"fetch": {
|
||||||
|
"args": {
|
||||||
|
"owner": "timbertson",
|
||||||
|
"repo": "gup",
|
||||||
|
"rev": "version-0.6.0",
|
||||||
|
"sha256": "053xnx39jh9kn9l572z4k0q7bbxjpisf1fm9aq27ybj2ha1rh6wr"
|
||||||
|
},
|
||||||
|
"fn": "fetchFromGitHub",
|
||||||
|
"rev": "version-0.6.0",
|
||||||
|
"version": "0.6.0"
|
||||||
|
},
|
||||||
|
"owner": "timbertson",
|
||||||
|
"repo": "gup",
|
||||||
|
"rev": "version-{version}",
|
||||||
|
"type": "fetchFromGitHub"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user