Unverified Commit 7f871ed0 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #336761 from wineee/deepin-clone

parents 2987ca54 c4bd4f44
Loading
Loading
Loading
Loading
+0 −74
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitHub
, cmake
, qttools
, pkg-config
, qtbase
, wrapQtAppsHook
, dtkwidget
, qt5integration
, qt5platform-plugins
, libuuid
, parted
, partclone
}:

stdenv.mkDerivation rec {
  pname = "deepin-clone";
  version = "5.0.15";

  src = fetchFromGitHub {
    owner = "linuxdeepin";
    repo = pname;
    rev = version;
    hash = "sha256-yxYmRSiw/pjgHftu75S9yx0ZXrWRz0VbU8jPjl4baqQ=";
  };

  postPatch = ''
    substituteInPlace app/{deepin-clone-ionice,deepin-clone-pkexec,com.deepin.pkexec.deepin-clone.policy.tmp} \
      --replace "/usr" "$out"

    substituteInPlace app/src/corelib/ddevicediskinfo.cpp \
      --replace "/sbin/blkid" "${libuuid}/bin/blkid"

    substituteInPlace app/src/corelib/helper.cpp \
      --replace "/bin/lsblk" "${libuuid}/bin/lsblk" \
      --replace "/sbin/sfdisk" "${libuuid}/bin/sfdisk" \
      --replace "/sbin/partprobe" "${parted}/bin/partprobe" \
      --replace "/usr/sbin" "${partclone}/bin"
  '';

  nativeBuildInputs = [
    cmake
    qttools
    pkg-config
    wrapQtAppsHook
  ];

  buildInputs = [
    qtbase
    dtkwidget
    qt5integration
    qt5platform-plugins
    libuuid
    parted
    partclone
  ];

  cmakeFlags = [
    "-DDISABLE_DFM_PLUGIN=YES"
  ];

  strictDeps = true;

  meta = with lib; {
    description = "Disk and partition backup/restore tool";
    homepage = "https://github.com/linuxdeepin/deepin-clone";
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    maintainers = teams.deepin.members;
    broken = true;
  };
}
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ let
    deepin-calculator = callPackage ./apps/deepin-calculator { };
    deepin-camera = callPackage ./apps/deepin-camera { };
    deepin-compressor = callPackage ./apps/deepin-compressor { };
    deepin-clone = callPackage ./apps/deepin-clone { };
    deepin-draw = callPackage ./apps/deepin-draw { };
    deepin-editor = callPackage ./apps/deepin-editor { };
    deepin-image-viewer = callPackage ./apps/deepin-image-viewer { };
@@ -102,6 +101,7 @@ let
  } // lib.optionalAttrs config.allowAliases {
    dde-kwin = throw "The 'deepin.dde-kwin' package was removed as it is outdated and no longer relevant."; # added 2023-09-27
    dde-launcher = throw "The 'deepin.dde-launcher' is no longer maintained. Please use 'deepin.dde-launchpad' instead."; # added 2023-11-23
    deepin-clone = throw "The 'deepin.deepin-clone' package was removed as it is broken and unmaintained."; # added 2024-08-23
    go-lib = throw "Then 'deepin.go-lib' package was removed, use 'go mod' to manage it"; # added 2024-05-31
    go-gir-generator = throw "Then 'deepin.go-gir-generator' package was removed, use 'go mod' to manage it"; # added 2024-05-31
    go-dbus-factory = throw "Then 'deepin.go-dbus-factory' package was removed, use 'go mod' to manage it"; # added 2024-05-31