From b52f5dba48d39a67112f95a15dd0a786959f0e52 Mon Sep 17 00:00:00 2001 From: Tim Cuthbertson Date: Sun, 22 Apr 2018 11:17:59 +1000 Subject: [PATCH] gup: simplify build expression --- .../tools/build-managers/gup/build.nix | 16 ---------- .../tools/build-managers/gup/default.nix | 32 +++++++++++-------- 2 files changed, 18 insertions(+), 30 deletions(-) delete mode 100644 pkgs/development/tools/build-managers/gup/build.nix diff --git a/pkgs/development/tools/build-managers/gup/build.nix b/pkgs/development/tools/build-managers/gup/build.nix deleted file mode 100644 index a9af037bb81..00000000000 --- a/pkgs/development/tools/build-managers/gup/build.nix +++ /dev/null @@ -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 - ''; -} diff --git a/pkgs/development/tools/build-managers/gup/default.nix b/pkgs/development/tools/build-managers/gup/default.nix index 8d1ad4490e9..748a59bda2f 100644 --- a/pkgs/development/tools/build-managers/gup/default.nix +++ b/pkgs/development/tools/build-managers/gup/default.nix @@ -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; + }; +}