Revert "gup: 0.5.5 -> 0.6.0 and derivation update"

This reverts commit a59c3038cd26863ab0eb90aad813440dfec1a59e due to
use of importJSON.

+20 -59
+7 -23
pkgs/development/tools/build-managers/gup/build.nix
··· 1 - # NOTE: the `nixpkgs` version of this file is copied from the upstream repository 2 - # for this package. Please make any changes to https://github.com/timbertson/gup/ 1 + # NOTE: this file is copied from the upstream repository for this package. 2 + # Please submit any changes you make here to https://github.com/timbertson/gup/ 3 3 4 - { stdenv, lib, pythonPackages }: 5 - { src, version, meta ? {}, passthru ? {}, forceTests ? false }: 6 - let 7 - testInputs = [ 8 - pythonPackages.mocktest or null 9 - pythonPackages.whichcraft 10 - pythonPackages.nose 11 - pythonPackages.nose_progressive 12 - ]; 13 - pychecker = pythonPackages.pychecker or null; 14 - usePychecker = forceTests || pychecker != null; 15 - enableTests = forceTests || (lib.all (dep: dep != null) testInputs); 16 - in 4 + { stdenv, lib, python, which, pychecker ? null }: 5 + { src, version, meta ? {} }: 17 6 stdenv.mkDerivation { 18 - inherit src meta passthru; 7 + inherit src meta; 19 8 name = "gup-${version}"; 20 - buildInputs = [ pythonPackages.python ] 21 - ++ (lib.optionals enableTests testInputs) 22 - ++ (lib.optional usePychecker pychecker) 23 - ; 24 - SKIP_PYCHECKER = !usePychecker; 9 + buildInputs = lib.remove null [ python which pychecker ]; 10 + SKIP_PYCHECKER = pychecker == null; 25 11 buildPhase = "make python"; 26 - inherit pychecker; 27 - testPhase = if enableTests then "make test" else "true"; 28 12 installPhase = '' 29 13 mkdir $out 30 14 cp -r python/bin $out/bin
-6
pkgs/development/tools/build-managers/gup/build.nix.gup
··· 1 - #!/bin/bash 2 - set -eu 3 - if [ -n "${GUP_TARGET:-}" ]; then 4 - gup --always 5 - fi 6 - curl -LSs -o "$1" https://raw.githubusercontent.com/timbertson/gup/master/nix/gup-python.nix
+13 -13
pkgs/development/tools/build-managers/gup/default.nix
··· 1 - { stdenv, fetchFromGitHub, lib, pythonPackages, nix-update-source, curl }: 1 + { stdenv, fetchFromGitHub, lib, python, which }: 2 + let 3 + version = "0.5.5"; 4 + src = fetchFromGitHub { 5 + sha256 = "12yv0j333z6jkaaal8my3jx3k4ml9hq8ldis5zfvr8179d4xah7q"; 6 + rev = "version-${version}"; 7 + repo = "gup"; 8 + owner = "timbertson"; 9 + }; 10 + in 2 11 import ./build.nix 3 - { inherit stdenv lib pythonPackages; } 4 - { inherit (nix-update-source.fetch ./src.json) src version; 12 + { inherit stdenv lib python which; } 13 + { inherit src version; 5 14 meta = { 6 - homepage = https://github.com/timbertson/gup/; 15 + inherit (src.meta) homepage; 7 16 description = "A better make, inspired by djb's redo"; 8 17 license = stdenv.lib.licenses.lgpl2Plus; 9 18 maintainers = [ stdenv.lib.maintainers.timbertson ]; 10 19 platforms = stdenv.lib.platforms.all; 11 - }; 12 - passthru = { 13 - updateScript = '' 14 - set -e 15 - echo 16 - cd ${toString ./.} 17 - ${nix-update-source}/bin/nix-update-source --prompt version src.json 18 - ./build.nix.gup build.nix 19 - ''; 20 20 }; 21 21 }
-17
pkgs/development/tools/build-managers/gup/src.json
··· 1 - { 2 - "fetch": { 3 - "args": { 4 - "owner": "timbertson", 5 - "repo": "gup", 6 - "rev": "version-0.6.0", 7 - "sha256": "053xnx39jh9kn9l572z4k0q7bbxjpisf1fm9aq27ybj2ha1rh6wr" 8 - }, 9 - "fn": "fetchFromGitHub", 10 - "rev": "version-0.6.0", 11 - "version": "0.6.0" 12 - }, 13 - "owner": "timbertson", 14 - "repo": "gup", 15 - "rev": "version-{version}", 16 - "type": "fetchFromGitHub" 17 - }