about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2022-06-26 19:30:23 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2022-06-27 22:57:02 -0300
commit34a6690deddead6bfb4b57758a481876ab8f0ad6 (patch)
tree968dff343b9a175093f7b3d1a8b3f9240b278fe3 /pkgs
parentf2bcc211d7fc313d6b83e666dc184c7fa0bebe7b (diff)
doublecmd: init at 1.0.6
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/file-managers/doublecmd/default.nix74
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/applications/file-managers/doublecmd/default.nix b/pkgs/applications/file-managers/doublecmd/default.nix
new file mode 100644
index 0000000000000..0222f5be48381
--- /dev/null
+++ b/pkgs/applications/file-managers/doublecmd/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, dbus
+, fpc
+, getopt
+, glib
+, lazarus
+, libX11
+, libqt5pas
+, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "doublecmd";
+  version = "1.0.6";
+
+  src = fetchFromGitHub {
+    owner = "doublecmd";
+    repo = "doublecmd";
+    rev = "v${version}";
+    hash = "sha256-aEWu/bRVOwjK6QTWsMntRYwAfjuwo9SNuH4qkQn0mOY=";
+  };
+
+  nativeBuildInputs = [
+    fpc
+    getopt
+    lazarus
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    dbus
+    glib
+    libX11
+    libqt5pas
+  ];
+
+  NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath buildInputs}";
+
+  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
+  '';
+
+  meta = with lib; {
+    homepage = "https://doublecmd.sourceforge.io/";
+    description = "Two-panel graphical file manager written in Pascal";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = with platforms; linux;
+  };
+}
+# TODO: deal with other platforms too
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 0ace5a916435f..ec10fb1b9abbd 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1578,6 +1578,10 @@ with pkgs;
 
   clifm = callPackage ../applications/file-managers/clifm { };
 
+  doublecmd = callPackage  ../applications/file-managers/doublecmd {
+    inherit (qt5) wrapQtAppsHook;
+  };
+
   joshuto = callPackage ../applications/file-managers/joshuto {
     inherit (darwin.apple_sdk.frameworks) SystemConfiguration Foundation;
   };