summary refs log tree commit diff
path: root/pkgs/tools/filesystems
diff options
context:
space:
mode:
authorBignaux Ronan <ronan@aimao.org>2019-05-11 17:03:59 +0200
committerBignaux Ronan <ronan@aimao.org>2019-05-18 14:41:13 +0200
commit7b09727d37fc96cf2fbacea1b9954cc119d4ec97 (patch)
tree8fb58fcd0257ea2f6e00e2891581d2aed86f7684 /pkgs/tools/filesystems
parent6ca0b1462ffda6382678a39e1d4a8d11988da604 (diff)
downloadnixpkgs-7b09727d37fc96cf2fbacea1b9954cc119d4ec97.tar
nixpkgs-7b09727d37fc96cf2fbacea1b9954cc119d4ec97.tar.gz
nixpkgs-7b09727d37fc96cf2fbacea1b9954cc119d4ec97.tar.bz2
nixpkgs-7b09727d37fc96cf2fbacea1b9954cc119d4ec97.tar.lz
nixpkgs-7b09727d37fc96cf2fbacea1b9954cc119d4ec97.tar.xz
nixpkgs-7b09727d37fc96cf2fbacea1b9954cc119d4ec97.tar.zst
nixpkgs-7b09727d37fc96cf2fbacea1b9954cc119d4ec97.zip
cpcfs: init at 0.85.4
Diffstat (limited to 'pkgs/tools/filesystems')
-rw-r--r--pkgs/tools/filesystems/cpcfs/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/cpcfs/default.nix b/pkgs/tools/filesystems/cpcfs/default.nix
new file mode 100644
index 00000000000..46635aa6741
--- /dev/null
+++ b/pkgs/tools/filesystems/cpcfs/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, makeWrapper, ncurses, readline, ronn }:
+
+stdenv.mkDerivation rec {
+
+  pname = "cpcfs";
+  version = "0.85.4";
+  
+  src = fetchFromGitHub {
+    owner = "derikz";
+    repo = "cpcfs";
+    rev = "v${version}";
+    sha256 = "0rfbry0qy8mv746mzk9zdfffkdgq4w7invgb5cszjma2cp83q3i2";
+  };
+
+  sourceRoot = "source/src";
+
+  nativeBuildInputs = [ makeWrapper ncurses readline ronn ];
+
+  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
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Manipulating CPC dsk images and files";
+    homepage = "https://github.com/derikz/cpcfs/" ;
+    license = licenses.bsd2;
+    maintainers = [ maintainers.genesis ];
+    platforms = platforms.linux;
+  };
+}