mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 16:42:09 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{lib, stdenv, fetchFromGitHub, libxml2, file, p7zip, unrar, unzip}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "rarcrack";
|
|
version = "0.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jaredsburrows";
|
|
repo = "Rarcrack";
|
|
rev = "35ead64cd2b967eec3e3e3a4c328b89b11ff32a0";
|
|
sha256 = "134fq84896w5vp8vg4qg0ybpb466njibigyd7bqqm1xydr07qrgn";
|
|
};
|
|
|
|
buildInputs = [ libxml2 file p7zip unrar unzip ];
|
|
buildFlags = stdenv.lib.optional stdenv.cc.isClang "CC=clang";
|
|
installFlags = [ "PREFIX=\${out}" ];
|
|
|
|
patchPhase = ''
|
|
substituteInPlace rarcrack.c --replace "file -i" "${file}/bin/file -i"
|
|
'';
|
|
|
|
preInstall = ''
|
|
mkdir -p $out/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "This program can crack zip,7z and rar file passwords";
|
|
longDescription = ''
|
|
If you forget your password for compressed archive (rar, 7z, zip), this program is the solution.
|
|
This program uses bruteforce algorithm to find correct password. You can specify wich characters will be used in password generations.
|
|
Warning: Please don't use this program for any illegal things!
|
|
'';
|
|
homepage = "https://github.com/jaredsburrows/Rarcrack";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ davidak ];
|
|
platforms = with platforms; unix;
|
|
};
|
|
}
|
|
|