1{
2 stdenv,
3 lib,
4 fetchurl,
5}:
6let
7 mkCmdPackDerivation =
8 {
9 pname,
10 postInstall ? "",
11 description,
12 }:
13 stdenv.mkDerivation {
14 inherit pname postInstall;
15
16 version = "1.03";
17
18 src = fetchurl {
19 url = "https://web.archive.org/web/20140330233023/http://www.neillcorlett.com/downloads/cmdpack-1.03-src.tar.gz";
20 sha256 = "0v0a9rpv59w8lsp1cs8f65568qj65kd9qp7854z1ivfxfpq0da2n";
21 };
22
23 buildPhase = ''
24 runHook preBuild
25
26 $CC -o "$pname" "src/$pname.c"
27
28 runHook postBuild
29 '';
30
31 installPhase = ''
32 runHook preInstall
33
34 install -Dm555 -t "$out/bin" "$pname"
35
36 runHook postInstall
37 '';
38
39 meta = with lib; {
40 inherit description;
41
42 homepage = "https://web.archive.org/web/20140330233023/http://www.neillcorlett.com/cmdpack/";
43 platforms = platforms.all;
44 license = licenses.gpl3Plus;
45 maintainers = with maintainers; [ zane ];
46 };
47 };
48in
49{
50 bin2iso = mkCmdPackDerivation {
51 pname = "bin2iso";
52 description = "Convert CD .BIN to .ISO";
53 };
54
55 bincomp = mkCmdPackDerivation {
56 pname = "bincomp";
57 description = "Compare binary files";
58 };
59
60 brrrip = mkCmdPackDerivation {
61 pname = "brrrip";
62 description = "Rip SNES BRR sound samples";
63 };
64
65 byteshuf = mkCmdPackDerivation {
66 pname = "byteshuf";
67 description = "Shuffle or unshuffle bytes in a file";
68 };
69
70 byteswap = mkCmdPackDerivation {
71 pname = "byteswap";
72 description = "Swap byte order of files";
73 };
74
75 cdpatch = mkCmdPackDerivation {
76 pname = "cdpatch";
77 description = "CD-XA image insert/extract utility";
78 };
79
80 ecm = mkCmdPackDerivation {
81 pname = "ecm";
82 postInstall = "ln $out/bin/ecm $out/bin/unecm";
83 description = "Encoder/decoder for Error Code Modeler format";
84 };
85
86 fakecrc = mkCmdPackDerivation {
87 pname = "fakecrc";
88 description = "Fake the CRC32 of a file";
89 };
90
91 hax65816 = mkCmdPackDerivation {
92 pname = "hax65816";
93 description = "Simple 65816 disassembler";
94 };
95
96 id3point = mkCmdPackDerivation {
97 pname = "id3point";
98 description = "Pointless ID3v1 Tagger";
99 };
100
101 pecompat = mkCmdPackDerivation {
102 pname = "pecompat";
103 description = "Maximize compatibility of a Win32 PE file";
104 };
105
106 rels = mkCmdPackDerivation {
107 pname = "rels";
108 description = "Relative Searcher";
109 };
110
111 screamf = mkCmdPackDerivation {
112 pname = "screamf";
113 description = ".AMF to .S3M converter";
114 };
115
116 subfile = mkCmdPackDerivation {
117 pname = "subfile";
118 description = "Extract a portion of a file";
119 };
120
121 uips = mkCmdPackDerivation {
122 pname = "uips";
123 description = "Universal IPS patch create/apply utility";
124 };
125
126 usfv = mkCmdPackDerivation {
127 pname = "usfv";
128 description = "Universal SFV create/verify utility";
129 };
130
131 vb2rip = mkCmdPackDerivation {
132 pname = "vb2rip";
133 description = "VB2 sound format ripping utility";
134 };
135
136 wordadd = mkCmdPackDerivation {
137 pname = "wordadd";
138 description = "Addition word puzzle solver";
139 };
140
141 zerofill = mkCmdPackDerivation {
142 pname = "zerofill";
143 description = "Create a large, empty file";
144 };
145}