about summary refs log tree commit diff
path: root/pkgs/by-name/id
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-12-10 14:42:19 +0100
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-12-10 14:42:19 +0100
commit58651820bf8d249319949b3bf282baac55eb5127 (patch)
treecbc7f6ca319af973f9788df8893bc5937c723b65 /pkgs/by-name/id
parent64891e361bc375a00e2da0b98a07267d17abfa2e (diff)
idsk: refactor
Diffstat (limited to 'pkgs/by-name/id')
-rw-r--r--pkgs/by-name/id/idsk/package.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/by-name/id/idsk/package.nix b/pkgs/by-name/id/idsk/package.nix
new file mode 100644
index 0000000000000..58774d62c31ad
--- /dev/null
+++ b/pkgs/by-name/id/idsk/package.nix
@@ -0,0 +1,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;
+  };
+}