about summary refs log tree commit diff
path: root/pkgs/applications/misc/makeself
diff options
context:
space:
mode:
authorKeshav Kini <keshav.kini@gmail.com>2020-04-27 16:05:18 -0700
committerKeshav Kini <keshav.kini@gmail.com>2020-04-27 16:56:41 -0700
commit3f00b95282f2e25436370341867e9d8a2f03f875 (patch)
treee50514814a26853f3b7fab9dab67101fbfdd8011 /pkgs/applications/misc/makeself
parent697bff74fd9bad0eb19404756532838bd0204f3c (diff)
makeself: 2.4.0 -> 2.4.2
Upstream now provides a Makefile that builds a self-extracting installer and
also has a test target.  We don't need the self-extracting installer, but we
might as well build it anyway as an additional test.
Diffstat (limited to 'pkgs/applications/misc/makeself')
-rw-r--r--pkgs/applications/misc/makeself/Use-rm-from-PATH.patch43
-rw-r--r--pkgs/applications/misc/makeself/default.nix17
2 files changed, 10 insertions, 50 deletions
diff --git a/pkgs/applications/misc/makeself/Use-rm-from-PATH.patch b/pkgs/applications/misc/makeself/Use-rm-from-PATH.patch
deleted file mode 100644
index 80b9ebf4d5712..0000000000000
--- a/pkgs/applications/misc/makeself/Use-rm-from-PATH.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 81cf57e4653360af7f1718391e424fa05d8ea000 Mon Sep 17 00:00:00 2001
-From: Keshav Kini <keshav.kini@gmail.com>
-Date: Thu, 9 Aug 2018 18:36:15 -0700
-Subject: [PATCH] Use `rm` from PATH
-
-On NixOS (a Linux distribution), there is no `/bin/rm`, but an `rm`
-command will generally be available in one's path when running shell
-scripts. Here, I change a couple of invocations of `/bin/rm` into
-invocations of `rm` to deal with this issue.
-
-Since `rm` is already called elsewhere in the script without an
-absolute path, I assume this change will not cause any
-regressions. Still, I've tested this on a CentOS machine and a NixOS
-machine, though not other platforms.
----
- makeself-header.sh | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/makeself-header.sh b/makeself-header.sh
-index 4d2c005..2babf34 100755
---- a/makeself-header.sh
-+++ b/makeself-header.sh
-@@ -515,7 +515,7 @@ if test x"\$quiet" = xn; then
- fi
- res=3
- if test x"\$keep" = xn; then
--    trap 'echo Signal caught, cleaning up >&2; cd \$TMPROOT; /bin/rm -rf "\$tmpdir"; eval \$finish; exit 15' 1 2 3 15
-+    trap 'echo Signal caught, cleaning up >&2; cd \$TMPROOT; rm -rf "\$tmpdir"; eval \$finish; exit 15' 1 2 3 15
- fi
- 
- if test x"\$nodiskspace" = xn; then
-@@ -581,7 +581,7 @@ if test x"\$script" != x; then
- fi
- if test x"\$keep" = xn; then
-     cd "\$TMPROOT"
--    /bin/rm -rf "\$tmpdir"
-+    rm -rf "\$tmpdir"
- fi
- eval \$finish; exit \$res
- EOF
--- 
-2.14.1
-
diff --git a/pkgs/applications/misc/makeself/default.nix b/pkgs/applications/misc/makeself/default.nix
index 7dedf52e89396..6fcd86596fb3a 100644
--- a/pkgs/applications/misc/makeself/default.nix
+++ b/pkgs/applications/misc/makeself/default.nix
@@ -1,22 +1,21 @@
 { stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation rec {
-  version = "2.4.0";
+  version = "2.4.2";
   pname = "makeself";
 
   src = fetchFromGitHub {
     owner = "megastep";
     repo = "makeself";
     rev = "release-${version}";
-    sha256 = "1lw3gx1zpzp2wmzrw5v7k31vfsrdzadqha9ni309fp07g8inrr9n";
+    fetchSubmodules = true;
+    sha256 = "07cq7q71bv3fwddkp2863ylry2ivds00f8sjy8npjpdbkailxm21";
   };
 
-  # backported from https://github.com/megastep/makeself/commit/77156e28ff21231c400423facc7049d9c60fd1bd
-  patches = [ ./Use-rm-from-PATH.patch ];
+  patchPhase = "patchShebangs test";
 
-  postPatch = ''
-    sed -e "s|^HEADER=.*|HEADER=$out/share/${pname}-${version}/makeself-header.sh|" -i makeself.sh
-  '';
+  doCheck = true;
+  checkTarget = "test";
 
   installPhase = ''
     mkdir -p $out/{bin,share/{${pname}-${version},man/man1}}
@@ -26,6 +25,10 @@ stdenv.mkDerivation rec {
     cp makeself-header.sh $out/share/${pname}-${version}
   '';
 
+  fixupPhase = ''
+    sed -e "s|^HEADER=.*|HEADER=$out/share/${pname}-${version}/makeself-header.sh|" -i $out/bin/makeself
+  '';
+
   meta = with stdenv.lib; {
     homepage = "http://megastep.org/makeself";
     description = "Utility to create self-extracting packages";