nixpkgs-suyu/pkgs/desktops/deepin/dtkcore/default.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2018-10-30 23:17:45 +01:00
{ stdenv, fetchFromGitHub, pkgconfig, qmake, gsettings-qt, pythonPackages, deepin }:
2018-09-01 13:19:20 +02:00
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "dtkcore";
2019-05-04 13:42:00 +02:00
version = "2.0.12.1";
2018-09-01 13:19:20 +02:00
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
2019-05-04 13:42:00 +02:00
sha256 = "1akfzkdhgsndm6rlr7snhpznxj0w351v6rr8vvnr6ka2dw75xsl4";
2018-09-01 13:19:20 +02:00
};
nativeBuildInputs = [
pkgconfig
qmake
pythonPackages.wrapPython
2019-05-04 13:42:00 +02:00
deepin.setupHook
2018-09-01 13:19:20 +02:00
];
buildInputs = [
gsettings-qt
];
postPatch = ''
2019-05-04 13:42:00 +02:00
searchHardCodedPaths # debugging
2018-09-01 13:19:20 +02:00
# Fix shebang
sed -i tools/script/dtk-translate.py -e "s,#!env,#!/usr/bin/env,"
'';
2019-05-04 13:42:00 +02:00
qmakeFlags = [ "MKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs" ];
2018-09-01 13:19:20 +02:00
postFixup = ''
chmod +x $out/lib/dtk2/*.py
wrapPythonProgramsIn "$out/lib/dtk2" "$out $pythonPath"
2019-05-04 13:42:00 +02:00
searchHardCodedPaths $out # debugging
2018-09-01 13:19:20 +02:00
'';
enableParallelBuilding = true;
2018-10-30 23:17:45 +01:00
passthru.updateScript = deepin.updateScript { inherit name; };
2018-09-01 13:19:20 +02:00
meta = with stdenv.lib; {
description = "Deepin tool kit core modules";
homepage = https://github.com/linuxdeepin/dtkcore;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo ];
};
}