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
88
pkgs/development/libraries/ada/gnatcoll/bindings.nix
Normal file
88
pkgs/development/libraries/ada/gnatcoll/bindings.nix
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, gnat
|
||||
, gprbuild
|
||||
, gnatcoll-core
|
||||
, component
|
||||
# component dependencies
|
||||
, gmp
|
||||
, libiconv
|
||||
, xz
|
||||
, gcc-unwrapped
|
||||
, readline
|
||||
, zlib
|
||||
, python3
|
||||
, ncurses
|
||||
}:
|
||||
|
||||
let
|
||||
# omit python (2.7), no need to introduce a
|
||||
# dependency on an EOL package for no reason
|
||||
libsFor = {
|
||||
iconv = [ libiconv ];
|
||||
gmp = [ gmp ];
|
||||
lzma = [ xz ];
|
||||
readline = [ readline ];
|
||||
python3 = [ python3 ncurses ];
|
||||
syslog = [ ];
|
||||
zlib = [ zlib ];
|
||||
};
|
||||
in
|
||||
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnatcoll-${component}";
|
||||
version = "22.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AdaCore";
|
||||
repo = "gnatcoll-bindings";
|
||||
rev = "v${version}";
|
||||
sha256 = "0wbwnd6jccwfd4jdxbnzhc0jhm8ad4phz6y9b1gk8adykkk6jcz4";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./omp-setup-text-mode.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
gprbuild
|
||||
gnat
|
||||
python3
|
||||
];
|
||||
|
||||
# propagate since gprbuild needs to find referenced .gpr files
|
||||
# and all dependency C libraries when statically linking a
|
||||
# downstream executable.
|
||||
propagatedBuildInputs = [
|
||||
gnatcoll-core
|
||||
] ++ libsFor."${component}" or [];
|
||||
|
||||
# explicit flag for GPL acceptance because upstreams
|
||||
# allows a gcc runtime exception for all bindings
|
||||
# except for readline (since it is GPL w/o exceptions)
|
||||
buildFlags = lib.optionals (component == "readline") [
|
||||
"--accept-gpl"
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
${python3.interpreter} ${component}/setup.py build --prefix $out $buildFlags
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
${python3.interpreter} ${component}/setup.py install --prefix $out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "GNAT Components Collection - Bindings to C libraries";
|
||||
homepage = "https://github.com/AdaCore/gnatcoll-bindings";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
};
|
||||
}
|
||||
47
pkgs/development/libraries/ada/gnatcoll/core.nix
Normal file
47
pkgs/development/libraries/ada/gnatcoll/core.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, gnat
|
||||
, gprbuild
|
||||
, fetchFromGitHub
|
||||
, xmlada
|
||||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnatcoll-core";
|
||||
version = "22.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AdaCore";
|
||||
repo = "gnatcoll-core";
|
||||
rev = "v${version}";
|
||||
sha256 = "0fn28dp6bgpp1sshr09m1x85g2gx11xqkiy410hiicfyg5hamh1l";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gprbuild
|
||||
which
|
||||
gnat
|
||||
];
|
||||
|
||||
# propagate since gprbuild needs to find
|
||||
# referenced GPR project definitions
|
||||
propagatedBuildInputs = [
|
||||
gprbuild # libgpr
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"prefix=${placeholder "out"}"
|
||||
"PROCESSORS=$(NIX_BUILD_CORES)"
|
||||
# confusingly, for gprbuild --target is autoconf --host
|
||||
"TARGET=${stdenv.hostPlatform.config}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/AdaCore/gnatcoll-core";
|
||||
description = "GNAT Components Collection - Core packages";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
110
pkgs/development/libraries/ada/gnatcoll/db.nix
Normal file
110
pkgs/development/libraries/ada/gnatcoll/db.nix
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, gnat
|
||||
, gprbuild
|
||||
, which
|
||||
, gnatcoll-core
|
||||
, xmlada
|
||||
, component
|
||||
# components built by this derivation other components depend on
|
||||
, gnatcoll-sql
|
||||
, gnatcoll-sqlite
|
||||
, gnatcoll-xref
|
||||
# component specific extra dependencies
|
||||
, gnatcoll-iconv
|
||||
, gnatcoll-readline
|
||||
, sqlite
|
||||
, postgresql
|
||||
}:
|
||||
|
||||
let
|
||||
libsFor = {
|
||||
gnatcoll_db2ada = [
|
||||
gnatcoll-sql
|
||||
];
|
||||
gnatinspect = [
|
||||
gnatcoll-sqlite
|
||||
gnatcoll-readline
|
||||
gnatcoll-xref
|
||||
];
|
||||
postgres = [
|
||||
gnatcoll-sql
|
||||
postgresql
|
||||
];
|
||||
sqlite = [
|
||||
gnatcoll-sql
|
||||
sqlite
|
||||
];
|
||||
xref = [
|
||||
gnatcoll-iconv
|
||||
gnatcoll-sqlite
|
||||
];
|
||||
};
|
||||
|
||||
# These components are just tools and don't install a library
|
||||
onlyExecutable = builtins.elem component [
|
||||
"gnatcoll_db2ada"
|
||||
"gnatinspect"
|
||||
];
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnatcoll-${component}";
|
||||
version = "22.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AdaCore";
|
||||
repo = "gnatcoll-db";
|
||||
rev = "v${version}";
|
||||
sha256 = "1c39yg13faadg5mzpq3s83rn24npmpc4yjj0cvj7kqwpqxci4m55";
|
||||
};
|
||||
|
||||
patches = lib.optionals (component == "sqlite") [
|
||||
# fixes build of the static sqlite component
|
||||
# when building against the system libsqlite3
|
||||
# See https://github.com/AdaCore/gprbuild/issues/27#issuecomment-298444608
|
||||
./gnatcoll-db-sqlite-static-external.patch
|
||||
];
|
||||
|
||||
# Link executables dynamically unless specified by the platform,
|
||||
# as we usually do in nixpkgs where possible
|
||||
postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
|
||||
for f in gnatcoll_db2ada/Makefile gnatinspect/Makefile; do
|
||||
substituteInPlace "$f" --replace "=static" "=relocatable"
|
||||
done
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
gnat
|
||||
gprbuild
|
||||
which
|
||||
];
|
||||
|
||||
# Propagate since GPRbuild needs to find referenced .gpr files
|
||||
# and other libraries to link against when static linking is used.
|
||||
# For executables this is of course not relevant and we can reduce
|
||||
# the closure size dramatically
|
||||
${if onlyExecutable then "buildInputs" else "propagatedBuildInputs"} = [
|
||||
gnatcoll-core
|
||||
] ++ libsFor."${component}" or [];
|
||||
|
||||
makeFlags = [
|
||||
"-C" component
|
||||
"PROCESSORS=$(NIX_BUILD_CORES)"
|
||||
# confusingly, for gprbuild --target is autoconf --host
|
||||
"TARGET=${stdenv.hostPlatform.config}"
|
||||
"prefix=${placeholder "out"}"
|
||||
] ++ lib.optional (component == "sqlite") [
|
||||
# link against packaged, not vendored libsqlite3
|
||||
"GNATCOLL_SQLITE=external"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "GNAT Components Collection - Database packages";
|
||||
homepage = "https://github.com/AdaCore/gnatcoll-db";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/sqlite/gnatcoll_sqlite.gpr b/sqlite/gnatcoll_sqlite.gpr
|
||||
index 5bd53d35..580739f8 100644
|
||||
--- a/sqlite/gnatcoll_sqlite.gpr
|
||||
+++ b/sqlite/gnatcoll_sqlite.gpr
|
||||
@@ -69,7 +69,12 @@ project GnatColl_Sqlite is
|
||||
for Source_Dirs use (".", "amalgamation");
|
||||
when "external" =>
|
||||
for Source_Dirs use (".");
|
||||
- for Library_Options use ("-lsqlite3") & Thread_Lib;
|
||||
+ case Library_Type is
|
||||
+ when "relocatable" =>
|
||||
+ for Library_Options use ("-lsqlite3") & Thread_Lib;
|
||||
+ when others =>
|
||||
+ null;
|
||||
+ end case;
|
||||
end case;
|
||||
|
||||
package Compiler is
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
commit 37c815ee660d1bf37256638d23b0346ad7cc19e7
|
||||
Author: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>
|
||||
Date: Wed Jul 21 00:18:30 2021 +0200
|
||||
|
||||
omp/setup.py: open version_information in text mode
|
||||
|
||||
Otherwise saving the config in setup_support.py will fail as a bytes
|
||||
object is not encodeable as JSON. Luckily, version_information is text
|
||||
anyways.
|
||||
|
||||
diff --git a/omp/setup.py b/omp/setup.py
|
||||
index 942ab1f5..5281398e 100755
|
||||
--- a/omp/setup.py
|
||||
+++ b/omp/setup.py
|
||||
@@ -25,7 +25,7 @@ class GNATCollOMP(SetupApp):
|
||||
|
||||
# Set library version
|
||||
with open(os.path.join(config.source_dir, '..',
|
||||
- 'version_information'), 'rb') as fd:
|
||||
+ 'version_information'), 'r') as fd:
|
||||
version = fd.read().strip()
|
||||
config.set_data('GNATCOLL_VERSION', version, sub='gprbuild')
|
||||
|
||||
35
pkgs/development/libraries/ada/xmlada/default.nix
Normal file
35
pkgs/development/libraries/ada/xmlada/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, gnat
|
||||
# use gprbuild-boot since gprbuild proper depends
|
||||
# on this xmlada derivation.
|
||||
, gprbuild-boot
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xmlada";
|
||||
version = "22.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
name = "xmlada-${version}-src";
|
||||
owner = "AdaCore";
|
||||
repo = "xmlada";
|
||||
rev = "v${version}";
|
||||
sha256 = "1pg6m0sfc1vwvd18r80jv2vwrsb2qgvyl8jmmrmpbdni0npx0kv3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gnat
|
||||
gprbuild-boot
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "XML/Ada: An XML parser for Ada";
|
||||
homepage = "https://github.com/AdaCore/xmlada";
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue