summary refs log tree commit diff
path: root/pkgs/os-specific/linux/macchanger/default.nix
diff options
context:
space:
mode:
authorRobert Schütz <dev@schuetz-co.de>2021-04-04 18:06:23 +0200
committerRobert Schütz <dev@schuetz-co.de>2021-04-04 21:34:59 +0200
commit60762033857050752b491390d4482348881fa2a7 (patch)
treeaef6943cd7833ee45b66ee87388b3cecad8cbbcd /pkgs/os-specific/linux/macchanger/default.nix
parent435128bee812264b2bd95476477e933a1a879a3a (diff)
downloadnixpkgs-60762033857050752b491390d4482348881fa2a7.tar
nixpkgs-60762033857050752b491390d4482348881fa2a7.tar.gz
nixpkgs-60762033857050752b491390d4482348881fa2a7.tar.bz2
nixpkgs-60762033857050752b491390d4482348881fa2a7.tar.lz
nixpkgs-60762033857050752b491390d4482348881fa2a7.tar.xz
nixpkgs-60762033857050752b491390d4482348881fa2a7.tar.zst
nixpkgs-60762033857050752b491390d4482348881fa2a7.zip
macchanger: apply patches from Debian
Gentoo does the same:
https://gitweb.gentoo.org/repo/gentoo.git/plain/net-analyzer/macchanger/macchanger-1.7.0_p5_p4.ebuild

This fixes e.g. https://github.com/alobbs/macchanger/issues/17.
Diffstat (limited to 'pkgs/os-specific/linux/macchanger/default.nix')
-rw-r--r--pkgs/os-specific/linux/macchanger/default.nix29
1 files changed, 26 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/macchanger/default.nix b/pkgs/os-specific/linux/macchanger/default.nix
index 5c3646f7b3c..1c516707049 100644
--- a/pkgs/os-specific/linux/macchanger/default.nix
+++ b/pkgs/os-specific/linux/macchanger/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, autoreconfHook, texinfo }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, texinfo }:
 
 stdenv.mkDerivation rec {
   pname = "macchanger";
@@ -11,15 +11,38 @@ stdenv.mkDerivation rec {
     sha256 = "1hypx6sxhd2b1nsxj314hpkhj7q4x9p2kfaaf20rjkkkig0nck9r";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/02-fix_usage_message.patch";
+      sha256 = "0pxljmq0l0znylbhms09i19qwil74gm8gx3xx2ffx00dajaizj18";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/06-update_OUI_list.patch";
+      sha256 = "04kbd784z9nwkjva5ckkvb0yb3pim9valb1viywn1yyh577d0y7w";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/08-fix_random_MAC_choice.patch";
+      sha256 = "1vz3appxxsdf1imzrn57amazfwlbrvx6g78b6n88aqgwzy5dm34d";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/check-random-device-read-errors.patch";
+      sha256 = "0pra6qnk39crjlidspg3l6hpaqiw43cypahx793l59mqn956cngc";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/verify-changed-MAC.patch";
+      sha256 = "0vjhf2fnj1hlghjl821p6idrfc8hmd4lgps5lf1l68ylqvwjw0zj";
+    })
+  ];
+
   nativeBuildInputs = [ autoreconfHook texinfo ];
 
   outputs = [ "out" "info" ];
 
   meta = with lib; {
     description = "A utility for viewing/manipulating the MAC address of network interfaces";
-    maintainers = with maintainers; [ joachifm ma27 ];
+    maintainers = with maintainers; [ joachifm ma27 dotlambda ];
     license = licenses.gpl2Plus;
-    homepage = "https://www.gnu.org/software/macchanger";
+    homepage = "https://github.com/alobbs/macchanger";
     platforms = platforms.linux;
   };
 }