mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #39324 from timbertson/gup
gup: simplify build expression
This commit is contained in:
commit
0589b4aac5
2 changed files with 34 additions and 33 deletions
|
@ -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
|
||||
'';
|
||||
}
|
|
@ -1,21 +1,38 @@
|
|||
{ stdenv, fetchFromGitHub, lib, python, which }:
|
||||
let
|
||||
{ stdenv, fetchFromGitHub, nix-update-source, lib, python, which, pychecker ? null }:
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.7.0";
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv";
|
||||
rev = "version-${version}";
|
||||
repo = "gup";
|
||||
owner = "timbertson";
|
||||
repo = "gup";
|
||||
rev = "version-0.7.0";
|
||||
sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv";
|
||||
};
|
||||
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
|
||||
'';
|
||||
passthru.updateScript = ''
|
||||
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
|
||||
'';
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue