summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/bc/bchunk/package.nix
blob: 392f9ca64bce6849e1ab13ed37373b16048e6cde (plain)
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
{
  lib,
  stdenv,
  fetchFromGitHub,
  nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "bchunk";
  version = "1.2.2";

  src = fetchFromGitHub {
    owner = "hessu";
    repo = "bchunk";
    tag = "release/${finalAttrs.version}";
    hash = "sha256-wFhBRLRwyC7FrGzadbssqLI9/UwfxBmFfOetaFJgsCo=";
  };

  makeFlags = lib.optionals stdenv.cc.isClang [
    "CC=${stdenv.cc.targetPrefix}cc"
    "LD=${stdenv.cc.targetPrefix}cc"
  ];

  installPhase = ''
    install -Dt $out/bin bchunk
    install -Dt $out/share/man/man1 bchunk.1
  '';

  passthru.updateScript = nix-update-script { };

  meta = {
    homepage = "http://he.fi/bchunk/";
    description = "Program that converts CD images in BIN/CUE format into a set of ISO and CDR tracks";
    platforms = lib.platforms.unix;
    license = lib.licenses.gpl2Plus;
    mainProgram = "bchunk";
  };
})