nixpkgs/pkgs/by-name/yo/yodl/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

53 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitLab, perl, icmake, util-linux }:
stdenv.mkDerivation rec {
pname = "yodl";
version = "4.03.03";
nativeBuildInputs = [ icmake ];
buildInputs = [ perl ];
src = fetchFromGitLab {
hash = "sha256-MeD/jjhwoiWTb/G8pHrnEEX22h+entPr9MhJ6WHO3DM=";
rev = version;
repo = "yodl";
owner = "fbb-git";
};
setSourceRoot = ''
sourceRoot=$(echo */yodl)
'';
preConfigure = ''
patchShebangs ./build
patchShebangs scripts/
substituteInPlace INSTALL.im --replace /usr $out
substituteInPlace macros/rawmacros/startdoc.pl --replace /usr/bin/perl ${perl}/bin/perl
substituteInPlace scripts/yodl2whatever.in --replace getopt ${util-linux}/bin/getopt
'';
# Set TERM because icmbuild calls tput.
TERM = "xterm";
buildPhase = ''
./build programs
./build macros
./build man
'';
installPhase = ''
./build install programs
./build install macros
./build install man
'';
meta = with lib; {
description = "Package that implements a pre-document language and tools to process it";
homepage = "https://fbb-git.gitlab.io/yodl/";
license = licenses.gpl3;
maintainers = with maintainers; [ pSub ];
platforms = platforms.linux;
};
}