nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

chntpw: refactor

+60 -46
+60 -46
pkgs/by-name/ch/chntpw/package.nix
··· 3 3 stdenv, 4 4 fetchurl, 5 5 unzip, 6 - fetchpatch, 6 + fetchDebianPatch, 7 7 }: 8 8 9 9 stdenv.mkDerivation rec { ··· 18 18 19 19 nativeBuildInputs = [ unzip ]; 20 20 21 - patches = [ 22 - ./00-chntpw-build-arch-autodetect.patch 23 - ./01-chntpw-install-target.patch 24 - # Import various bug fixes from debian 25 - (fetchpatch { 26 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/04_get_abs_path"; 27 - sha256 = "17h0gaczqd5b792481synr1ny72frwslb779lm417pyrz6kh9q8n"; 28 - }) 29 - (fetchpatch { 30 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/06_correct_test_open_syscall"; 31 - sha256 = "00lg83bimbki988n71w54mmhjp9529r0ngm40d7fdmnc2dlpj3hd"; 32 - }) 33 - (fetchpatch { 34 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/07_detect_failure_to_write_key"; 35 - sha256 = "0pk6xnprh2pqyx4n4lw3836z6fqsw3mclkzppl5rhjaahriwxw4l"; 36 - }) 37 - (fetchpatch { 38 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/08_no_deref_null"; 39 - sha256 = "1g7pfmjaj0c2sm64s3api2kglj7jbgddjjd3r4drw6phwdkah0zs"; 40 - }) 41 - (fetchpatch { 42 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/09_improve_robustness"; 43 - sha256 = "1nszkdy01ixnain7cwdmfbhjngphw1300ifagc1wgl9wvghzviaa"; 44 - }) 45 - (fetchpatch { 46 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/11_improve_documentation"; 47 - sha256 = "0yql6hj72q7cq69rrspsjkpiipdhcwb0b9w5j8nhq40cnx9mgqgg"; 48 - }) 49 - (fetchpatch { 50 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/12_readonly_filesystem"; 51 - sha256 = "1kxcy7f2pl6fqgmjg8bnl3pl5wgiw5xnbyx12arinmqkkggp4fa4"; 52 - }) 53 - (fetchpatch { 54 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/13_write_to_hive"; 55 - sha256 = "1638lcyxjkrkmbr3n28byixny0qrxvkciw1xd97x48mj6bnwqrkv"; 56 - }) 57 - (fetchpatch { 58 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/14_improve_description"; 59 - sha256 = "11y5kc4dh4zv24nkb0jw2zwlifx6nzsd4jbizn63l6dbpqgb25rs"; 60 - }) 61 - (fetchpatch { 62 - url = "https://sources.debian.org/data/main/c/chntpw/140201-1.2/debian/patches/17_hexdump-pointer-type.patch"; 63 - sha256 = "ir9LFl8FJq141OwF5SbyVMtjQ1kTMH1NXlHl0XZq7m8="; 64 - }) 65 - ]; 21 + patches = 22 + let 23 + fetchChntpwDebianPatch = 24 + { patch, hash }: 25 + fetchDebianPatch { 26 + inherit 27 + hash 28 + patch 29 + pname 30 + version 31 + ; 32 + debianRevision = "1.2"; 33 + }; 34 + in 35 + [ 36 + ./00-chntpw-build-arch-autodetect.patch 37 + ./01-chntpw-install-target.patch 38 + # Import various bug fixes from debian 39 + (fetchChntpwDebianPatch { 40 + patch = "04_get_abs_path"; 41 + hash = "sha256-FuEEp/nZ3xNIpemcRTXPThxvQ7ZeB0REOqs0/Jl6AJ4="; 42 + }) 43 + (fetchChntpwDebianPatch { 44 + patch = "06_correct_test_open_syscall"; 45 + hash = "sha256-DQ55aRPM1uZOA6Q+C3ISJV0JayWFh2MRSnGuGtdAjwI="; 46 + }) 47 + (fetchChntpwDebianPatch { 48 + patch = "07_detect_failure_to_write_key"; 49 + hash = "sha256-lPDOY4ZKSZgLvfdPyurgGjvzzUCDU2JJ9/gKmK/tZl4="; 50 + }) 51 + (fetchChntpwDebianPatch { 52 + patch = "08_no_deref_null"; 53 + hash = "sha256-+gOoZuPwGp4byaNJ2dpb8kj6pohXDU1M1YIBqWR197w="; 54 + }) 55 + (fetchChntpwDebianPatch { 56 + patch = "09_improve_robustness"; 57 + hash = "sha256-SsX94ds80ccDe8pFAEbg8D4r4XK1cXZsVLbHAHybX9s="; 58 + }) 59 + (fetchChntpwDebianPatch { 60 + patch = "11_improve_documentation"; 61 + hash = "sha256-7+FXU7cMEAwtkoWnBRZnsN0Y75T66pyTwexgcSQ0FHs="; 62 + }) 63 + (fetchChntpwDebianPatch { 64 + patch = "12_readonly_filesystem"; 65 + hash = "sha256-RDly35sTVxuzEqH7ZXvh8fFC76B2oSfrw87QK9zxrM8="; 66 + }) 67 + (fetchChntpwDebianPatch { 68 + patch = "13_write_to_hive"; 69 + hash = "sha256-e2bM7TKyItJPaj3wyObuGQNve/QLCTvyqjNP2T2jaJg="; 70 + }) 71 + (fetchChntpwDebianPatch { 72 + patch = "14_improve_description"; 73 + hash = "sha256-OhexHr6rGTqM/XFJ0vS3prtI+RdcgjUtEfsT2AibxYc="; 74 + }) 75 + (fetchChntpwDebianPatch { 76 + patch = "17_hexdump-pointer-type.patch"; 77 + hash = "sha256-ir9LFl8FJq141OwF5SbyVMtjQ1kTMH1NXlHl0XZq7m8="; 78 + }) 79 + ]; 66 80 67 81 installPhase = '' 68 82 make install PREFIX=$out