mirror of
https://gitlab.com/d3tn/ud3tn.git
synced 2026-08-18 13:09:11 +02:00
In order to prepare the implementation of a SQLite-based storage CLA, a basic structure of this CLA with empty functions is created and adjustments are made to the configuration/initialization functions and the build system. Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
88 lines
2.1 KiB
Nix
88 lines
2.1 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
|
};
|
|
|
|
outputs = { self, nixpkgs }: {
|
|
|
|
apps.x86_64-linux.default = {
|
|
type = "app";
|
|
program = "${self.packages.x86_64-linux.ud3tn}/bin/ud3tn";
|
|
};
|
|
|
|
packages.x86_64-linux =
|
|
let
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
|
in
|
|
{
|
|
ud3tn = pkgs.stdenv.mkDerivation {
|
|
pname = "ud3tn";
|
|
version = "0.13.0";
|
|
|
|
src = pkgs.lib.sourceByRegex ./. [
|
|
"Makefile"
|
|
"^components.*"
|
|
"^external.*"
|
|
"^generated.*"
|
|
"^include.*"
|
|
"^mk.*"
|
|
];
|
|
|
|
buildInputs = [
|
|
pkgs.sqlite
|
|
];
|
|
|
|
buildPhase = ''
|
|
make type=release optimize=yes -j $NIX_BUILD_CORES ud3tn
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp build/posix/ud3tn $out/bin/
|
|
'';
|
|
};
|
|
|
|
pyd3tn = with pkgs.python3Packages; buildPythonPackage {
|
|
name = "pyd3tn";
|
|
src = ./pyd3tn;
|
|
propagatedBuildInputs = [ cbor ];
|
|
};
|
|
|
|
python-ud3tn-utils = with pkgs.python3Packages; buildPythonPackage {
|
|
name = "ud3tn-utils";
|
|
src = ./python-ud3tn-utils;
|
|
propagatedBuildInputs = [ protobuf setuptools ];
|
|
};
|
|
};
|
|
|
|
devShells.x86_64-linux.default =
|
|
let
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
|
in
|
|
pkgs.mkShell {
|
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
packages = with self.packages.x86_64-linux; with pkgs; [
|
|
# self
|
|
pyd3tn
|
|
python-ud3tn-utils
|
|
ud3tn
|
|
# nixpkgs
|
|
clang-tools
|
|
gdb
|
|
llvmPackages.libcxxClang
|
|
nixpkgs-fmt
|
|
protobuf
|
|
python3Packages.flake8
|
|
python3Packages.pip
|
|
python3Packages.protobuf
|
|
python3Packages.pytest
|
|
python3Packages.setuptools
|
|
sqlite
|
|
];
|
|
};
|
|
|
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
|
|
};
|
|
}
|