pkgs/ultimatepp: add uppPackage builder
This commit is contained in:
parent
73142b030f
commit
ea8ac1c2c6
2 changed files with 119 additions and 18 deletions
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
callPackage,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
pkg-config,
|
||||
|
@ -21,6 +22,22 @@
|
|||
|
||||
let
|
||||
buildMethod = if stdenv.cc.isClang then "CLANG" else "GCC";
|
||||
uppsrcDependencies = [
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
gtk3
|
||||
libnotify
|
||||
libpng
|
||||
openssl
|
||||
xorg.libX11
|
||||
xorg.libXdmcp
|
||||
xorg.libXext
|
||||
xorg.libXft
|
||||
xorg.libXinerama
|
||||
xorg.libXrender
|
||||
xorg.libxcb
|
||||
];
|
||||
in stdenv.mkDerivation (self: let
|
||||
selfBootstrap = self.overrideAttrs (selfAttrs: superAttrs: {
|
||||
passthru = superAttrs.passthru // {
|
||||
|
@ -45,24 +62,7 @@ in {
|
|||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
# in the same order as in the Makefile
|
||||
libpng
|
||||
freetype
|
||||
fontconfig
|
||||
xorg.libX11
|
||||
xorg.libxcb
|
||||
expat
|
||||
xorg.libXinerama
|
||||
xorg.libXrender
|
||||
xorg.libXft
|
||||
xorg.libXdmcp
|
||||
xorg.libXext
|
||||
gtk3
|
||||
libnotify
|
||||
# not in the Makefile
|
||||
openssl
|
||||
] ++ lib.optional (!self.passthru.bootstrap) libclang;
|
||||
buildInputs = uppsrcDependencies ++ lib.optional (!self.passthru.bootstrap) libclang;
|
||||
|
||||
patches = [
|
||||
./no-build-info.patch
|
||||
|
@ -118,6 +118,26 @@ in {
|
|||
|
||||
passthru = {
|
||||
bootstrap = false;
|
||||
inherit uppsrcDependencies;
|
||||
buildUppPackage = callPackage ./buildUppPackage.nix {};
|
||||
tests = lib.genAttrs [
|
||||
"AddressBookXML2"
|
||||
"Bombs"
|
||||
"Days"
|
||||
"SQLApp"
|
||||
"httpcli"
|
||||
] (examplePackageName: self.passthru.buildUppPackage {
|
||||
pname = examplePackageName;
|
||||
version = self.version;
|
||||
package = examplePackageName;
|
||||
src = self.src;
|
||||
includeUppsrcAssembly = false;
|
||||
buildInputs = self.passthru.uppsrcDependencies;
|
||||
assembly = "examples";
|
||||
extraAssemblies = [
|
||||
"uppsrc"
|
||||
];
|
||||
});
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue