2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, ncurses, readline, ronn }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
pname = "cpcfs";
|
|
|
|
version = "0.85.4";
|
2020-11-21 19:51:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "derikz";
|
|
|
|
repo = "cpcfs";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0rfbry0qy8mv746mzk9zdfffkdgq4w7invgb5cszjma2cp83q3i2";
|
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/src";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ncurses readline ronn ];
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-std=gnu89";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '-ltermcap' '-lncurses' \
|
|
|
|
--replace '-L /usr/lib/termcap' ' '
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/man/man1
|
|
|
|
cp cpcfs $out/bin
|
|
|
|
ronn --roff ../template.doc --pipe > $out/man/man1/cpcfs.1
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Manipulating CPC dsk images and files";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cpcfs";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/derikz/cpcfs/" ;
|
|
|
|
license = licenses.bsd2;
|
2020-11-21 19:51:51 +00:00
|
|
|
maintainers = [ ];
|
2021-03-19 17:17:44 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|