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
26
pkgs/desktops/lumina/default.nix
Normal file
26
pkgs/desktops/lumina/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, libsForQt5 }:
|
||||
|
||||
let
|
||||
packages = self: with self; {
|
||||
|
||||
lumina = callPackage ./lumina { };
|
||||
lumina-calculator = callPackage ./lumina-calculator { };
|
||||
lumina-pdf = callPackage ./lumina-pdf { };
|
||||
|
||||
preRequisitePackages = [
|
||||
pkgs.fluxbox
|
||||
pkgs.libsForQt5.kwindowsystem
|
||||
pkgs.numlockx
|
||||
pkgs.qt5.qtsvg
|
||||
pkgs.xscreensaver
|
||||
];
|
||||
|
||||
corePackages = [
|
||||
lumina
|
||||
lumina-calculator
|
||||
lumina-pdf
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
in pkgs.lib.makeScope libsForQt5.newScope packages
|
||||
32
pkgs/desktops/lumina/lumina-calculator/default.nix
Normal file
32
pkgs/desktops/lumina/lumina-calculator/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, mkDerivation, fetchFromGitHub, qmake, qtbase, qttools }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "lumina-calculator";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lumina-desktop";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1238d1m0mjkwkdpgq165a4ql9aql0aji5f41rzdzny6m7ws9nm2y";
|
||||
};
|
||||
|
||||
sourceRoot = "source/src-qt5";
|
||||
|
||||
nativeBuildInputs = [ qmake qttools ];
|
||||
|
||||
buildInputs = [ qtbase ];
|
||||
|
||||
qmakeFlags = [
|
||||
"CONFIG+=WITH_I18N"
|
||||
"LRELEASE=${lib.getDev qttools}/bin/lrelease"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Scientific calculator for the Lumina Desktop";
|
||||
homepage = "https://github.com/lumina-desktop/lumina-calculator";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = teams.lumina.members;
|
||||
};
|
||||
}
|
||||
38
pkgs/desktops/lumina/lumina-pdf/default.nix
Normal file
38
pkgs/desktops/lumina/lumina-pdf/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, mkDerivation, fetchFromGitHub, qmake, qtbase, qttools, poppler }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "lumina-pdf";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lumina-desktop";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "08caj4nashp79fbvj94rabn0iaa1hymifqmb782x03nb2vkn38r6";
|
||||
};
|
||||
|
||||
sourceRoot = "source/src-qt5";
|
||||
|
||||
nativeBuildInputs = [ qmake qttools ];
|
||||
|
||||
buildInputs = [ qtbase poppler ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i '1i\#include <memory>\' Renderer-poppler.cpp
|
||||
'';
|
||||
|
||||
qmakeFlags = [
|
||||
"CONFIG+=WITH_I18N"
|
||||
"LRELEASE=${lib.getDev qttools}/bin/lrelease"
|
||||
];
|
||||
|
||||
enableParallelBuilding = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "PDF viewer for the Lumina Desktop";
|
||||
homepage = "https://github.com/lumina-desktop/lumina-pdf";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = teams.lumina.members;
|
||||
};
|
||||
}
|
||||
26
pkgs/desktops/lumina/lumina/LuminaOS-NixOS.cpp.patch
Normal file
26
pkgs/desktops/lumina/lumina/LuminaOS-NixOS.cpp.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
diff --git a/src-qt5/core/libLumina/LuminaOS-NixOS.cpp b/src-qt5/core/libLumina/LuminaOS-NixOS.cpp
|
||||
index b92d1b0..441b1bf 100644
|
||||
--- a/src-qt5/core/libLumina/LuminaOS-NixOS.cpp
|
||||
+++ b/src-qt5/core/libLumina/LuminaOS-NixOS.cpp
|
||||
@@ -13,17 +13,17 @@
|
||||
//can't read xbrightness settings - assume invalid until set
|
||||
static int screenbrightness = -1;
|
||||
|
||||
-QString LOS::OSName(){ return "Gentoo Linux"; }
|
||||
+QString LOS::OSName(){ return "NixOS"; }
|
||||
|
||||
//OS-specific prefix(s)
|
||||
// NOTE: PREFIX, L_ETCDIR, L_SHAREDIR are defined in the OS-detect.pri project file and passed in
|
||||
QString LOS::LuminaShare(){ return (L_SHAREDIR+"/lumina-desktop/"); } //Install dir for Lumina share files
|
||||
-QString LOS::AppPrefix(){ return "/usr/"; } //Prefix for applications
|
||||
-QString LOS::SysPrefix(){ return "/"; } //Prefix for system
|
||||
+QString LOS::AppPrefix(){ return PREFIX+"/usr"; } //Prefix for applications
|
||||
+QString LOS::SysPrefix(){ return PREFIX; } //Prefix for system
|
||||
|
||||
//OS-specific application shortcuts (*.desktop files)
|
||||
QString LOS::ControlPanelShortcut(){ return ""; } //system control panel
|
||||
-QString LOS::AppStoreShortcut(){ return LOS::AppPrefix() + "/share/applications/porthole.desktop"; } //graphical app/pkg manager
|
||||
+QString LOS::AppStoreShortcut(){ return ""; } //graphical app/pkg manager
|
||||
//OS-specific RSS feeds (Format: QStringList[ <name>::::<url> ]; )
|
||||
QStringList LOS::RSSFeeds(){ return QStringList(); }
|
||||
|
||||
113
pkgs/desktops/lumina/lumina/default.nix
Normal file
113
pkgs/desktops/lumina/lumina/default.nix
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, fluxbox
|
||||
, hicolor-icon-theme
|
||||
, libarchive
|
||||
, numlockx
|
||||
, qmake
|
||||
, qtbase
|
||||
, qtmultimedia
|
||||
, qtsvg
|
||||
, qttools
|
||||
, qtx11extras
|
||||
, xorg
|
||||
, xscreensaver
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "lumina";
|
||||
version = "1.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lumina-desktop";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1llr65gilcf0k88f9mbwzlalqwdnjy4nv2jq7w154z0xmd6iarfq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
qmake
|
||||
qttools
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fluxbox # window manager for Lumina DE
|
||||
hicolor-icon-theme
|
||||
libarchive # make `bsdtar` available for lumina-archiver
|
||||
numlockx # required for changing state of numlock at login
|
||||
qtbase
|
||||
qtmultimedia
|
||||
qtsvg
|
||||
qtx11extras
|
||||
xorg.libXcursor
|
||||
xorg.libXdamage
|
||||
xorg.libxcb
|
||||
xorg.xcbutilimage
|
||||
xorg.xcbutilwm
|
||||
xscreensaver
|
||||
];
|
||||
|
||||
dontDropIconThemeCache = true;
|
||||
|
||||
patches = [
|
||||
./LuminaOS-NixOS.cpp.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
# Copy Gentoo setup as NixOS setup and then patch it
|
||||
# TODO: write a complete NixOS setup?
|
||||
cp -a src-qt5/core/libLumina/LuminaOS-Gentoo.cpp src-qt5/core/libLumina/LuminaOS-NixOS.cpp
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
# Avoid absolute path on sessdir
|
||||
substituteInPlace src-qt5/OS-detect.pri \
|
||||
--replace L_SESSDIR=/usr/share/xsessions '#L_SESSDIR=/usr/share/xsessions'
|
||||
|
||||
# Fix plugin dir
|
||||
substituteInPlace src-qt5/core/lumina-theme-engine/lthemeengine.pri \
|
||||
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
|
||||
|
||||
# Fix location of fluxbox styles
|
||||
substituteInPlace src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp \
|
||||
--replace 'LOS::AppPrefix()+"share/fluxbox' "\"${fluxbox}/share/fluxbox"
|
||||
|
||||
# Add full path of bsdtar to lumina-archiver
|
||||
substituteInPlace src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp \
|
||||
--replace '"bsdtar"' '"${lib.getBin libarchive}/bin/bsdtar"'
|
||||
|
||||
# Fix installation path of lumina-sudo
|
||||
substituteInPlace src-qt5/desktop-utils/lumina-sudo/lumina-sudo.pro \
|
||||
--replace "/usr/bin" "$out/bin"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
for theme in lumina-icons material-design-{dark,light}; do
|
||||
gtk-update-icon-cache $out/share/icons/$theme
|
||||
done
|
||||
'';
|
||||
|
||||
qmakeFlags = [
|
||||
"LINUX_DISTRO=NixOS"
|
||||
"CONFIG+=WITH_I18N"
|
||||
"LRELEASE=${lib.getDev qttools}/bin/lrelease"
|
||||
];
|
||||
|
||||
passthru.providedSessions = [ "Lumina-DE" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A lightweight, portable desktop environment";
|
||||
longDescription = ''
|
||||
The Lumina Desktop Environment is a lightweight system interface
|
||||
that is designed for use on any Unix-like operating system. It
|
||||
is based on QT5.
|
||||
'';
|
||||
homepage = "https://lumina-desktop.org";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = teams.lumina.members;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue