2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, dbus
|
|
|
|
, fpc
|
|
|
|
, getopt
|
|
|
|
, glib
|
|
|
|
, lazarus
|
|
|
|
, libX11
|
|
|
|
, libqt5pas
|
|
|
|
, wrapQtAppsHook
|
|
|
|
}:
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-07-14 12:49:19 +00:00
|
|
|
pname = "doublecmd";
|
2024-09-26 11:04:55 +00:00
|
|
|
version = "1.1.18";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "doublecmd";
|
|
|
|
repo = "doublecmd";
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-09-26 11:04:55 +00:00
|
|
|
hash = "sha256-1lmDmtvkLMLxvF6ZTOShr5fsYN++Jm6+ngzgFyNjFn4=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
fpc
|
|
|
|
getopt
|
|
|
|
lazarus
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
dbus
|
|
|
|
glib
|
|
|
|
libX11
|
|
|
|
libqt5pas
|
|
|
|
];
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
env.NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath finalAttrs.buildInputs}";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build.sh install/linux/install.sh
|
|
|
|
substituteInPlace build.sh \
|
|
|
|
--replace '$(which lazbuild)' '"${lazarus}/bin/lazbuild --lazarusdir=${lazarus}/share/lazarus"'
|
|
|
|
substituteInPlace install/linux/install.sh \
|
|
|
|
--replace '$DC_INSTALL_PREFIX/usr' '$DC_INSTALL_PREFIX'
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
./build.sh release qt5
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install/linux/install.sh -I $out
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
meta = {
|
2022-07-14 12:49:19 +00:00
|
|
|
homepage = "https://doublecmd.sourceforge.io/";
|
|
|
|
description = "Two-panel graphical file manager written in Pascal";
|
2023-10-19 13:55:26 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
mainProgram = "doublecmd";
|
|
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
|
|
platforms = lib.platforms.linux;
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
2022-11-21 17:40:18 +00:00
|
|
|
})
|
2022-07-14 12:49:19 +00:00
|
|
|
# TODO: deal with other platforms too
|