1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00

gup: simplify build expression

This commit is contained in:
Tim Cuthbertson 2018-04-22 11:17:59 +10:00
parent 313b5fce7b
commit b52f5dba48
2 changed files with 18 additions and 30 deletions

View file

@ -1,16 +0,0 @@
# NOTE: this file is copied from the upstream repository for this package.
# Please submit any changes you make here to https://github.com/timbertson/gup/
{ stdenv, lib, python, which, pychecker ? null }:
{ src, version, meta ? {} }:
stdenv.mkDerivation {
inherit src meta;
name = "gup-${version}";
buildInputs = lib.remove null [ python which pychecker ];
SKIP_PYCHECKER = pychecker == null;
buildPhase = "make python";
installPhase = ''
mkdir $out
cp -r python/bin $out/bin
'';
}

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, lib, python, which }:
let
{ stdenv, fetchFromGitHub, lib, python, which, pychecker ? null }:
stdenv.mkDerivation rec {
version = "0.7.0";
src = fetchFromGitHub {
sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv";
@ -7,15 +7,19 @@ let
repo = "gup";
owner = "timbertson";
};
in
import ./build.nix
{ inherit stdenv lib python which; }
{ inherit src version;
meta = {
inherit (src.meta) homepage;
description = "A better make, inspired by djb's redo";
license = stdenv.lib.licenses.lgpl2Plus;
maintainers = [ stdenv.lib.maintainers.timbertson ];
platforms = stdenv.lib.platforms.all;
};
}
name = "gup-${version}";
buildInputs = lib.remove null [ python which pychecker ];
SKIP_PYCHECKER = pychecker == null;
buildPhase = "make python";
installPhase = ''
mkdir $out
cp -r python/bin $out/bin
'';
meta = {
inherit (src.meta) homepage;
description = "A better make, inspired by djb's redo";
license = stdenv.lib.licenses.lgpl2Plus;
maintainers = [ stdenv.lib.maintainers.timbertson ];
platforms = stdenv.lib.platforms.all;
};
}