uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
--- chntpw-140201.orig/Makefile 2014-02-01 17:54:37.000000000 +0100
|
||||
+++ chntpw-140201/Makefile 2022-04-21 00:14:45.000000000 +0200
|
||||
@@ -6,24 +6,7 @@
|
||||
# See INSTALL for more info.
|
||||
#
|
||||
|
||||
-#SSLPATH=/usr/local/ssl
|
||||
-OSSLPATH=/usr
|
||||
-OSSLINC=$(OSSLPATH)/include
|
||||
-
|
||||
-CC=gcc
|
||||
-
|
||||
-# Force 32 bit
|
||||
-CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -m32
|
||||
-OSSLLIB=$(OSSLPATH)/lib
|
||||
-
|
||||
-# 64 bit if default for compiler setup
|
||||
-#CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall
|
||||
-#OSSLLIB=$(OSSLPATH)/lib64
|
||||
-
|
||||
-
|
||||
-# This is to link with whatever we have, SSL crypto lib we put in static
|
||||
-#LIBS=-L$(OSSLLIB) $(OSSLLIB)/libcrypto.a
|
||||
-LIBS=-L$(OSSLLIB)
|
||||
+CFLAGS= -DUSEOPENSSL -g -I. -Wall
|
||||
|
||||
|
||||
all: chntpw chntpw.static cpnt reged reged.static samusrgrp samusrgrp.static sampasswd sampasswd.static
|
||||
20
pkgs/tools/security/chntpw/01-chntpw-install-target.patch
Normal file
20
pkgs/tools/security/chntpw/01-chntpw-install-target.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
--- chntpw-140201/Makefile 2022-04-21 00:14:45.000000000 +0200
|
||||
+++ chntpw-140201.new/Makefile 2022-04-21 09:15:42.000000000 +0200
|
||||
@@ -6,10 +6,16 @@
|
||||
# See INSTALL for more info.
|
||||
#
|
||||
|
||||
+PREFIX ?= /usr
|
||||
+
|
||||
CFLAGS= -DUSEOPENSSL -g -I. -Wall
|
||||
|
||||
+BINARIES := chntpw cpnt reged samusrgrp sampasswd
|
||||
|
||||
-all: chntpw chntpw.static cpnt reged reged.static samusrgrp samusrgrp.static sampasswd sampasswd.static
|
||||
+all: $(BINARIES)
|
||||
+install: $(BINARIES)
|
||||
+ mkdir -p $(PREFIX)/bin
|
||||
+ cp $^ $(PREFIX)/bin
|
||||
|
||||
chntpw: chntpw.o ntreg.o edlib.o libsam.o
|
||||
$(CC) $(CFLAGS) -o chntpw chntpw.o ntreg.o edlib.o libsam.o $(LIBS)
|
||||
68
pkgs/tools/security/chntpw/default.nix
Normal file
68
pkgs/tools/security/chntpw/default.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{ lib, stdenv, fetchurl, unzip, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "chntpw";
|
||||
|
||||
version = "140201";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://pogostick.net/~pnh/ntpasswd/chntpw-source-${version}.zip";
|
||||
sha256 = "1k1cxsj0221dpsqi5yibq2hr7n8xywnicl8yyaicn91y8h2hkqln";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
patches = [
|
||||
./00-chntpw-build-arch-autodetect.patch
|
||||
./01-chntpw-install-target.patch
|
||||
# Import various bug fixes from debian
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/04_get_abs_path";
|
||||
sha256 = "17h0gaczqd5b792481synr1ny72frwslb779lm417pyrz6kh9q8n";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/06_correct_test_open_syscall";
|
||||
sha256 = "00lg83bimbki988n71w54mmhjp9529r0ngm40d7fdmnc2dlpj3hd";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/07_detect_failure_to_write_key";
|
||||
sha256 = "0pk6xnprh2pqyx4n4lw3836z6fqsw3mclkzppl5rhjaahriwxw4l";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/08_no_deref_null";
|
||||
sha256 = "1g7pfmjaj0c2sm64s3api2kglj7jbgddjjd3r4drw6phwdkah0zs";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/09_improve_robustness";
|
||||
sha256 = "1nszkdy01ixnain7cwdmfbhjngphw1300ifagc1wgl9wvghzviaa";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/11_improve_documentation";
|
||||
sha256 = "0yql6hj72q7cq69rrspsjkpiipdhcwb0b9w5j8nhq40cnx9mgqgg";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/12_readonly_filesystem";
|
||||
sha256 = "1kxcy7f2pl6fqgmjg8bnl3pl5wgiw5xnbyx12arinmqkkggp4fa4";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/13_write_to_hive";
|
||||
sha256 = "1638lcyxjkrkmbr3n28byixny0qrxvkciw1xd97x48mj6bnwqrkv";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/chntpw/140201-1/debian/patches/14_improve_description";
|
||||
sha256 = "11y5kc4dh4zv24nkb0jw2zwlifx6nzsd4jbizn63l6dbpqgb25rs";
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
make install PREFIX=$out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://pogostick.net/~pnh/ntpasswd/";
|
||||
description = "An utility to reset the password of any user that has a valid local account on a Windows system";
|
||||
maintainers = with lib.maintainers; [ deepfire ];
|
||||
license = licenses.gpl2;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue