mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-04 03:53:56 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{ lib, 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 = "${src.name}/src";
|
|
|
|
nativeBuildInputs = [ makeWrapper ncurses readline ronn ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = "-std=gnu89";
|
|
|
|
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 lib; {
|
|
description = "Manipulating CPC dsk images and files";
|
|
mainProgram = "cpcfs";
|
|
homepage = "https://github.com/derikz/cpcfs/" ;
|
|
license = licenses.bsd2;
|
|
maintainers = [ ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|