about summary refs log tree commit diff
path: root/pkgs/tools/misc/cmdpack/default.nix
blob: 0fe2c75d1ea0a6e274e2feaa2e870fd5df53a202 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{ stdenv, lib, fetchurl }:
let
  mkCmdPackDerivation = { pname, postInstall ? "", description }: stdenv.mkDerivation {
    inherit pname postInstall;

    version = "1.03";

    src = fetchurl {
      url = "https://web.archive.org/web/20140330233023/http://www.neillcorlett.com/downloads/cmdpack-1.03-src.tar.gz";
      sha256 = "0v0a9rpv59w8lsp1cs8f65568qj65kd9qp7854z1ivfxfpq0da2n";
    };

    buildPhase = ''
      runHook preBuild

      gcc -o ${pname} src/${pname}.c

      runHook postBuild
    '';

    installPhase = ''
      runHook preInstall

      mkdir -p $out/bin
      cp ${pname} $out/bin

      runHook postInstall
    '';

    meta = with lib; {
      inherit description;

      homepage = "https://web.archive.org/web/20140330233023/http://www.neillcorlett.com/cmdpack/";
      platforms = platforms.all;
      license = licenses.gpl3Plus;
      maintainers = with maintainers; [ zane ];
    };
  };
in
{
  bin2iso = mkCmdPackDerivation {
    pname = "bin2iso";
    description = "Convert CD .BIN to .ISO";
  };

  bincomp = mkCmdPackDerivation {
    pname = "bincomp";
    description = "Compare binary files";
  };

  brrrip = mkCmdPackDerivation {
    pname = "brrrip";
    description = "Rip SNES BRR sound samples";
  };

  byteshuf = mkCmdPackDerivation {
    pname = "byteshuf";
    description = "Shuffle or unshuffle bytes in a file";
  };

  byteswap = mkCmdPackDerivation {
    pname = "byteswap";
    description = "Swap byte order of files";
  };

  cdpatch = mkCmdPackDerivation {
    pname = "cdpatch";
    description = "CD-XA image insert/extract utility";
  };

  ecm = mkCmdPackDerivation {
    pname = "ecm";
    postInstall = "ln $out/bin/ecm $out/bin/unecm";
    description = "Encoder/decoder for Error Code Modeler format";
  };

  fakecrc = mkCmdPackDerivation {
    pname = "fakecrc";
    description = "Fake the CRC32 of a file";
  };

  hax65816 = mkCmdPackDerivation {
    pname = "hax65816";
    description = "Simple 65816 disassembler";
  };

  id3point = mkCmdPackDerivation {
    pname = "id3point";
    description = "Pointless ID3v1 Tagger";
  };

  pecompat = mkCmdPackDerivation {
    pname = "pecompat";
    description = "Maximize compatibility of a Win32 PE file";
  };

  rels = mkCmdPackDerivation {
    pname = "rels";
    description = "Relative Searcher";
  };

  screamf = mkCmdPackDerivation {
    pname = "screamf";
    description = ".AMF to .S3M converter";
  };

  subfile = mkCmdPackDerivation {
    pname = "subfile";
    description = "Extract a portion of a file";
  };

  uips = mkCmdPackDerivation {
    pname = "uips";
    description = "Universal IPS patch create/apply utility";
  };

  usfv = mkCmdPackDerivation {
    pname = "usfv";
    description = "Universal SFV create/verify utility";
  };

  vb2rip = mkCmdPackDerivation {
    pname = "vb2rip";
    description = "VB2 sound format ripping utility";
  };

  wordadd = mkCmdPackDerivation {
    pname = "wordadd";
    description = "Addition word puzzle solver";
  };

  zerofill = mkCmdPackDerivation {
    pname = "zerofill";
    description = "Create a large, empty file";
  };
}