summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Kögler <ck3d@gmx.de>2019-07-27 10:24:21 +0200
committerChristian Kögler <ck3d@gmx.de>2019-09-13 15:43:50 +0200
commit9b7e7e726e246f845283ec8c56fb1d2c203e6498 (patch)
treeacaaa00305cd6b5a31512190437c1472db0f4151
parente19054ab3cd5b7cc9a01d0efc71c8fe310541065 (diff)
downloadnixpkgs-9b7e7e726e246f845283ec8c56fb1d2c203e6498.tar
nixpkgs-9b7e7e726e246f845283ec8c56fb1d2c203e6498.tar.gz
nixpkgs-9b7e7e726e246f845283ec8c56fb1d2c203e6498.tar.bz2
nixpkgs-9b7e7e726e246f845283ec8c56fb1d2c203e6498.tar.lz
nixpkgs-9b7e7e726e246f845283ec8c56fb1d2c203e6498.tar.xz
nixpkgs-9b7e7e726e246f845283ec8c56fb1d2c203e6498.tar.zst
nixpkgs-9b7e7e726e246f845283ec8c56fb1d2c203e6498.zip
redo-apenwarr: update to release 0.42 and added docs and checks
-rw-r--r--pkgs/development/tools/build-managers/redo-apenwarr/beautifulsoup.nix20
-rw-r--r--pkgs/development/tools/build-managers/redo-apenwarr/default.nix86
-rw-r--r--pkgs/development/tools/build-managers/redo-apenwarr/mkdocs-exclude.nix20
3 files changed, 108 insertions, 18 deletions
diff --git a/pkgs/development/tools/build-managers/redo-apenwarr/beautifulsoup.nix b/pkgs/development/tools/build-managers/redo-apenwarr/beautifulsoup.nix
new file mode 100644
index 00000000000..571df924e1f
--- /dev/null
+++ b/pkgs/development/tools/build-managers/redo-apenwarr/beautifulsoup.nix
@@ -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";
+  };
+}
diff --git a/pkgs/development/tools/build-managers/redo-apenwarr/default.nix b/pkgs/development/tools/build-managers/redo-apenwarr/default.nix
index 7d08bbf6df2..83f87ac9661 100644
--- a/pkgs/development/tools/build-managers/redo-apenwarr/default.nix
+++ b/pkgs/development/tools/build-managers/redo-apenwarr/default.nix
@@ -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;
+
+  checkTarget = "test";
+
+  outputs = [ "out" "man" ];
+
+  installFlags = [
+    "PREFIX=$(out)"
+    "DESTDIR=/"
+  ];
+
+  nativeBuildInputs = [
+    python27
+    beautifulsoup
+    mkdocs
+    mkdocs-exclude
+    which
+    findutils
+  ];
 
-  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 ];
+  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;
   };
 }
diff --git a/pkgs/development/tools/build-managers/redo-apenwarr/mkdocs-exclude.nix b/pkgs/development/tools/build-managers/redo-apenwarr/mkdocs-exclude.nix
new file mode 100644
index 00000000000..d8c79e33dff
--- /dev/null
+++ b/pkgs/development/tools/build-managers/redo-apenwarr/mkdocs-exclude.nix
@@ -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;
+}