Merge pull request #39324 from timbertson/gup
gup: simplify build expression
This commit is contained in:
commit
0589b4aac5
@ -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,16 +1,33 @@
|
||||
{ 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;
|
||||
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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user