3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #65457 from ck3d/redo-0.42

redo-apenwarr: update to release 0.42 and added docs and checks
This commit is contained in:
Robin Gloster 2019-09-13 17:28:26 +02:00 committed by GitHub
commit ec64d881cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 108 additions and 18 deletions

View file

@ -0,0 +1,20 @@
{ pythonPackages, isPy3k, pkgs }:
pythonPackages.buildPythonPackage rec {
name = "beautifulsoup-3.2.1";
disabled = isPy3k;
src = pkgs.fetchurl {
url = "http://www.crummy.com/software/BeautifulSoup/download/3.x/BeautifulSoup-3.2.1.tar.gz";
sha256 = "1nshbcpdn0jpcj51x0spzjp519pkmqz0n0748j7dgpz70zlqbfpm";
};
# error: invalid command 'test'
doCheck = false;
meta = {
homepage = http://www.crummy.com/software/BeautifulSoup/;
license = "bsd";
description = "Undemanding HTML/XML parser";
};
}

View file

@ -1,30 +1,80 @@
{stdenv, fetchFromGitHub, python2, which}:
stdenv.mkDerivation {
pname = "redo-apenwarr";
{ stdenv, lib, python27, fetchFromGitHub, mkdocs, which, findutils, coreutils
, perl
, doCheck ? true
}: let
version = "unstable-2019-06-21";
# copy from
# pkgs/applications/networking/pyload/beautifulsoup.nix
beautifulsoup = python27.pkgs.callPackage ./beautifulsoup.nix {
pythonPackages = python27.pkgs;
};
mkdocs-exclude = python27.pkgs.callPackage ./mkdocs-exclude.nix {
pythonPackages = python27.pkgs;
};
in stdenv.mkDerivation rec {
pname = "redo-apenwarr";
version = "0.42";
src = fetchFromGitHub {
owner = "apenwarr";
repo = "redo";
rev = "8924fa35fa7363b531f8e6b48a1328d2407ad5cf";
sha256 = "1dj20w29najqjyvk0jh5kqbcd10k32rad986q5mzv4v49qcwdc1q";
repo = pname;
rev = "${pname}-${version}";
sha256 = "1060yb7hrxm8c7bfvb0y4j0acpxsj6hbykw1d9549zpkxxr9nsgm";
};
DESTDIR="";
PREFIX = placeholder "out";
postPatch = ''
patchShebangs minimal/do
'' + lib.optionalString doCheck ''
unset CC CXX
substituteInPlace minimal/do.test \
--replace "/bin/pwd" "${coreutils}/bin/pwd"
substituteInPlace t/105-sympath/all.do \
--replace "/bin/pwd" "${coreutils}/bin/pwd"
substituteInPlace t/all.do \
--replace "/bin/ls" "ls"
substituteInPlace t/110-compile/hello.o.do \
--replace "/usr/include" "${stdenv.cc.libc.dev}/include"
substituteInPlace t/200-shell/nonshelltest.do \
--replace "/usr/bin/env perl" "${perl}/bin/perl"
patchPhase = ''
patchShebangs .
'';
buildInputs = [ python2 which ];
inherit doCheck;
meta = with stdenv.lib; {
description = "Apenwarr version of the redo build tool.";
homepage = https://github.com/apenwarr/redo/;
license = stdenv.lib.licenses.asl20;
platforms = platforms.all;
maintainers = with stdenv.lib.maintainers; [ andrewchambers ];
checkTarget = "test";
outputs = [ "out" "man" ];
installFlags = [
"PREFIX=$(out)"
"DESTDIR=/"
];
nativeBuildInputs = [
python27
beautifulsoup
mkdocs
mkdocs-exclude
which
findutils
];
meta = with lib; {
description = "Smaller, easier, more powerful, and more reliable than make. An implementation of djb's redo.";
homepage = https://github.com/apenwarr/redo;
maintainers = with maintainers; [
andrewchambers
ck3d
];
license = licenses.asl20;
};
}

View file

@ -0,0 +1,20 @@
{ pythonPackages, isPy3k, pkgs }:
pythonPackages.buildPythonPackage rec {
name = "mkdocs-exclude";
disabled = isPy3k;
src = pkgs.fetchFromGitHub {
owner = "apenwarr";
repo = "mkdocs-exclude";
rev = "fdd67d2685ff706de126e99daeaaaf3f6f7cf3ae";
sha256 = "1phhl79xf4xq8w2sb2w5zm4bahcr33gsbxkz7dl1dws4qhcbxrfd";
};
buildInputs = with pkgs; [
mkdocs
];
# error: invalid command 'test'
doCheck = false;
}