2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libtiff, fpc }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
pname = "deskew";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.30";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-24 20:58:05 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-04-24 23:36:52 +00:00
|
|
|
owner = "galfar";
|
2020-11-24 20:58:05 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
hash = "sha256-xghVOEMkQ/mXpOzJqMaT3SII7xneMNoFqRlqjtzmDnA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ fpc ];
|
|
|
|
buildInputs = [ libtiff ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2022-02-10 20:34:41 +00:00
|
|
|
runHook preBuild
|
|
|
|
patchShebangs ./Scripts
|
|
|
|
pushd Scripts && ./compile.sh && popd
|
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-02-10 20:34:41 +00:00
|
|
|
runHook preInstall
|
|
|
|
install -Dt $out/bin Bin/deskew
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A command line tool for deskewing scanned text documents";
|
2022-02-10 20:34:41 +00:00
|
|
|
homepage = "https://galfar.vevb.net/deskew";
|
|
|
|
license = with licenses; [ mit mpl11 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ryantm];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|