summary refs log tree commit diff
path: root/pkgs/tools/compression/zdelta
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2021-03-17 16:43:11 +0700
committerBen Siraphob <bensiraphob@gmail.com>2021-03-18 23:02:05 +0700
commit3bced99816f7bcafb1d243a1d7d1baa557595b1c (patch)
treefc969ef4054bdbc241998fd5db344a16f20aeced /pkgs/tools/compression/zdelta
parent3a05aac83655970e879510e1b8b4e09a5f3bcdae (diff)
zdelta: expand platforms to all and refactor
Diffstat (limited to 'pkgs/tools/compression/zdelta')
-rw-r--r--pkgs/tools/compression/zdelta/builder.sh8
-rw-r--r--pkgs/tools/compression/zdelta/default.nix22
2 files changed, 15 insertions, 15 deletions
diff --git a/pkgs/tools/compression/zdelta/builder.sh b/pkgs/tools/compression/zdelta/builder.sh
deleted file mode 100644
index 03db413181d74..0000000000000
--- a/pkgs/tools/compression/zdelta/builder.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-source $stdenv/setup
-
-installPhase() {
-    mkdir -p $out/bin
-    cp -p zdc zdu $out/bin
-}
-
-genericBuild
diff --git a/pkgs/tools/compression/zdelta/default.nix b/pkgs/tools/compression/zdelta/default.nix
index 46760c9130605..b30a43f33c13a 100644
--- a/pkgs/tools/compression/zdelta/default.nix
+++ b/pkgs/tools/compression/zdelta/default.nix
@@ -1,16 +1,24 @@
-{lib, stdenv, fetchurl}:
+{ lib, stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "zdelta-2.1";
-  builder = ./builder.sh;
+  pname = "zdelta";
+  version = "2.1";
+
   src = fetchurl {
-    url = "${meta.homepage}/downloads/${name}.tar.gz";
-    sha256 = "0k6y0r9kv5qiglnr2j4a0yvfynjkvm0pyv8ly28j0pr3w6rbxrh3";
+    url = "https://web.archive.org/web/20160316212948/http://cis.poly.edu/zdelta/downloads/zdelta-2.1.tar.gz";
+    sha256 = "sha256-WiQKWxJkINIwRBcdiuVLMDiupQ8gOsiXOEZvHDa5iFg=";
   };
 
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -p zdc zdu $out/bin
+  '';
+
   meta = with lib; {
-    homepage = "http://cis.poly.edu/zdelta";
-    platforms = platforms.linux;
+    homepage = "https://web.archive.org/web/20160316212948/http://cis.poly.edu/zdelta/";
+    platforms = platforms.all;
     license = licenses.zlib;
   };
 }