mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 00:22:13 +00:00
a8a6d26f8f
The `3.0.1` build was broken (see the Hydra build from https://hydra.nixos.org/build/74368257 for further reference). Because of the missing `utillinux` build input the package fails fairly early: ``` -- Checking for module 'blkid' -- No package 'blkid' found CMake Error at /nix/store/9hmhxgj4jk6jmxihgavj6gm0p759misc-cmake-3.10.2/share/cmake-3.10/Modules/FindPkgConfig.cmake:415 (message): A required package was not found ``` Additionally `partition-manager` was broken on non-KDE desktops (none+i3 in my case) as the plugins from `libsForQt5.kpmcore` couldn't be found in `QT_PLUGIN_PATH` unless it's installed in `environment.systemPackages` or with `nix-env -iA libsForQt5.kpmcore`. This has been fixed by adding a wrapper in the `postInstall` hook which prefixes the `QT_PLUGIN_PATH` with the plugin path from `kpmcore` used for the build.
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{ mkDerivation, fetchurl, lib
|
|
, extra-cmake-modules, kdoctools, wrapGAppsHook
|
|
, kconfig, kcrash, kinit, kpmcore
|
|
, eject, libatasmart , utillinux, makeWrapper, qtbase
|
|
}:
|
|
|
|
let
|
|
pname = "partitionmanager";
|
|
in mkDerivation rec {
|
|
name = "${pname}-${version}";
|
|
version = "3.3.1";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
|
|
sha256 = "0jhggb4xksb0k0mj752n6pz0xmccnbzlp984xydqbz3hkigra1si";
|
|
};
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook makeWrapper ];
|
|
|
|
# refer to kpmcore for the use of eject
|
|
buildInputs = [ eject libatasmart utillinux ];
|
|
propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ];
|
|
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/partitionmanager" --prefix QT_PLUGIN_PATH : "${kpmcore}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "KDE Partition Manager";
|
|
license = licenses.gpl2;
|
|
homepage = https://www.kde.org/applications/system/kdepartitionmanager/;
|
|
maintainers = with maintainers; [ peterhoeg ma27 ];
|
|
};
|
|
}
|