about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/id/idsk/package.nix
blob: 58774d62c31ad129b4edde5b41d23f9567f3bcff (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
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
}:

stdenv.mkDerivation rec {
  pname = "idsk";
  version = "0.20";

  src = fetchFromGitHub {
    owner = "cpcsdk";
    repo = "idsk";
    rev = "v${version}";
    hash = "sha256-rYClWq1Nl3COoG+eOJyFDTvBSzpHpGminU4bndZs6xc=";
  };

  patches = [
    (fetchpatch {
      url = "https://github.com/cpcsdk/idsk/commit/52fa3cdcc10d4ba6c75cab10ca7067b129198d92.patch";
      hash = "sha256-Ll0apllNj+fP7kZ1n+bBowrlskLK1bIashxxgPVVxmg=";
    })
  ];

  nativeBuildInputs = [
    cmake
  ];

  installPhase = ''
    runHook preInstall

    install -Dm755 iDSK $out/bin/iDSK

    runHook postInstall
  '';

  meta = with lib; {
    description = "Manipulating CPC dsk images and files";
    homepage = "https://github.com/cpcsdk/idsk";
    license = licenses.mit;
    mainProgram = "iDSK";
    maintainers = with maintainers; [ wegank ];
    platforms = platforms.all;
  };
}