uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
68
pkgs/applications/editors/mindforger/default.nix
Normal file
68
pkgs/applications/editors/mindforger/default.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, cmark-gfm
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, qmake
|
||||
, qtbase
|
||||
, qtwebengine
|
||||
, wrapGAppsHook
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mindforger";
|
||||
version = "1.52.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/dvorka/mindforger/releases/download/${version}/mindforger_${version}.tgz";
|
||||
sha256 = "1pghsw8kwvjhg3jpmjs0n892h2l0pm0cs6ymi8b23fwk0kfj67rd";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake wrapGAppsHook wrapQtAppsHook ];
|
||||
buildInputs = [ qtbase qtwebengine cmark-gfm ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
patches = [
|
||||
# this makes the package relocatable - removes hardcoded references to /usr
|
||||
./paths.patch
|
||||
# this fixes compilation with QtWebEngine - referencing a commit trying to upstream the change - see https://github.com/dvorka/mindforger/pull/1357
|
||||
(fetchpatch {
|
||||
url = "https://github.com/dvorka/mindforger/commit/d28e2bade0278af1b5249953202810540969026a.diff";
|
||||
sha256 = "sha256-qHKQQNGSc3F9seaOHV0gzBQFFqcTXk91LpKrojjpAUw=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lib/src/install/installer.cpp --replace /usr "$out"
|
||||
substituteInPlace app/resources/gnome-shell/mindforger.desktop --replace /usr "$out"
|
||||
for f in app/app.pro lib/lib.pro; do
|
||||
substituteInPlace "$f" --replace "QMAKE_CXX = g++" ""
|
||||
done
|
||||
'';
|
||||
|
||||
qmakeFlags = [
|
||||
"-r"
|
||||
"mindforger.pro"
|
||||
"CONFIG+=mfnoccache"
|
||||
"CONFIG+=mfwebengine"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||
mkdir "$out"/Applications
|
||||
mv app/mindforger.app "$out"/Applications/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Thinking Notebook & Markdown IDE";
|
||||
longDescription = ''
|
||||
MindForger is actually more than an editor or IDE - it's human
|
||||
mind inspired personal knowledge management tool
|
||||
'';
|
||||
homepage = "https://www.mindforger.com";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ cyplo ];
|
||||
};
|
||||
}
|
||||
42
pkgs/applications/editors/mindforger/paths.patch
Normal file
42
pkgs/applications/editors/mindforger/paths.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
diff --git a/app/app.pro b/app/app.pro
|
||||
index 29f9d9e..15fd2ff 100644
|
||||
--- a/app/app.pro
|
||||
+++ b/app/app.pro
|
||||
@@ -370,7 +370,7 @@ RESOURCES += \
|
||||
# See http://doc.qt.io/qt-5/qmake-advanced-usage.html
|
||||
|
||||
binfile.files += mindforger
|
||||
-binfile.path = /usr/bin/
|
||||
+binfile.path = $$PREFIX/bin/
|
||||
INSTALLS += binfile
|
||||
|
||||
# ########################################
|
||||
diff --git a/mindforger.pro b/mindforger.pro
|
||||
index bd4f21d..6bb2dbc 100644
|
||||
--- a/mindforger.pro
|
||||
+++ b/mindforger.pro
|
||||
@@ -43,20 +43,20 @@ app.depends = lib
|
||||
#IMPORTANT: binfile MUST be specified in app/app.pro (project next to/that builds binary)
|
||||
|
||||
docfiles.files += doc/*
|
||||
-docfiles.path = /usr/share/doc/mindforger/
|
||||
+docfiles.path = $$PREFIX/share/doc/mindforger/
|
||||
INSTALLS += docfiles
|
||||
|
||||
manfiles.files += man/*
|
||||
-manfiles.path = /usr/share/man/man1/
|
||||
+manfiles.path = $$PREFIX/share/man/man1/
|
||||
INSTALLS += manfiles
|
||||
|
||||
iconfiles.files += app/resources/icons/*
|
||||
-iconfiles.path = /usr/share/icons/mindforger/
|
||||
+iconfiles.path = $$PREFIX/share/icons/mindforger/
|
||||
INSTALLS += iconfiles
|
||||
|
||||
# experiment w/ file
|
||||
shortcutfiles.files += app/resources/gnome-shell/mindforger.desktop
|
||||
-shortcutfiles.path = /usr/share/applications/
|
||||
+shortcutfiles.path = $$PREFIX/share/applications/
|
||||
INSTALLS += shortcutfiles
|
||||
|
||||
# eof
|
||||
Loading…
Add table
Add a link
Reference in a new issue