2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, lazarus, fpc, pango, cairo, glib
|
2024-02-07 01:22:34 +00:00
|
|
|
, atk, gtk2, libX11, gdk-pixbuf, busybox, python3
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
bgrabitmap = fetchFromGitHub {
|
|
|
|
owner = "bgrabitmap";
|
|
|
|
repo = "bgrabitmap";
|
2024-02-07 01:22:34 +00:00
|
|
|
rev = "2814b069d55f726b9f3b4774d85d00dd72be9c05";
|
|
|
|
hash = "sha256-YibwdhlgjgI30gqYsKchgDPlOSpBiDBDJNlUDFMygGs=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
bgracontrols = fetchFromGitHub {
|
|
|
|
owner = "bgrabitmap";
|
|
|
|
repo = "bgracontrols";
|
2024-02-07 01:22:34 +00:00
|
|
|
rev = "v8.0";
|
|
|
|
hash = "sha256-5L05eGVN+xncd0/0XLFN6EL2ux4aAOsiU0BMoy0dKgg=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "lazpaint";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "7.2.2-unstable-2024-01-20";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bgrabitmap";
|
|
|
|
repo = "lazpaint";
|
2024-02-07 01:22:34 +00:00
|
|
|
rev = "fe54c2e2561c51218a5a2755842ce3fc2e0ebb35";
|
|
|
|
hash = "sha256-LaOTJiS+COJUlyJiN9H2kEKwv5lbJqOHsUXOnb+IQFA=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ lazarus fpc makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = [ pango cairo glib atk gtk2 libX11 gdk-pixbuf ];
|
|
|
|
|
|
|
|
NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath buildInputs}";
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs configure
|
|
|
|
'';
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
buildPhase = ''
|
|
|
|
cp -r --no-preserve=mode ${bgrabitmap} bgrabitmap
|
|
|
|
cp -r --no-preserve=mode ${bgracontrols} bgracontrols
|
|
|
|
|
|
|
|
lazbuild --lazarusdir=${lazarus}/share/lazarus \
|
|
|
|
--build-mode=Release \
|
|
|
|
bgrabitmap/bgrabitmap/bgrabitmappack.lpk \
|
|
|
|
bgracontrols/bgracontrols.lpk \
|
|
|
|
lazpaintcontrols/lazpaintcontrols.lpk \
|
|
|
|
lazpaint/lazpaint.lpi
|
|
|
|
'';
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
postBuild = ''
|
2020-08-20 17:08:02 +00:00
|
|
|
# Python is needed for scripts
|
2024-02-07 01:22:34 +00:00
|
|
|
wrapProgram $out/bin/lazpaint \
|
2021-01-17 00:15:33 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ python3 ]}
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Image editor like PaintBrush or Paint.Net";
|
2024-02-07 01:22:34 +00:00
|
|
|
homepage = "https://lazpaint.github.io";
|
|
|
|
downloadPage = "https://github.com/bgrabitmap/lazpaint/";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|