Merge pull request #273348 from wegank/idsk-refactor

idsk: refactor
This commit is contained in:
Weijia Wang
2023-12-10 22:11:12 +01:00
committed by GitHub
3 changed files with 46 additions and 37 deletions
+46
View File
@@ -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;
};
}
-35
View File
@@ -1,35 +0,0 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "idsk";
version = "0.20";
src = fetchFromGitHub {
repo = "idsk";
owner = "cpcsdk";
rev = "v${version}";
sha256 = "05zbdkb9s6sfkni6k927795w2fqdhnf3i7kgl27715sdmmdab05d";
};
nativeBuildInputs = [ cmake ];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
# Needed with GCC 12 but breaks on darwin (with clang)
"-std=c++14"
]);
installPhase = ''
mkdir -p $out/bin
cp iDSK $out/bin
'';
meta = with lib; {
description = "Manipulating CPC dsk images and files";
homepage = "https://github.com/cpcsdk/idsk" ;
license = licenses.mit;
maintainers = [ ];
mainProgram = "iDSK";
platforms = platforms.all;
};
}
-2
View File
@@ -40458,8 +40458,6 @@ with pkgs;
utsushi-networkscan = callPackage ../misc/drivers/utsushi/networkscan.nix { };
idsk = callPackage ../tools/filesystems/idsk { stdenv = gcc10StdenvCompat; };
colima = callPackage ../applications/virtualization/colima { };
lima = callPackage ../applications/virtualization/lima {