ud3tn/nix/shell.nix
Maximilian Nitsch ada5f57efa nix: Add SPDX-License-Identifier
Adds a SPDX-License-Identifier to all nix files and adjust
`license-check.sh` to consider Nix files and the corresponding
directories.

Filtering directories that should not be checked is now performed in the
find command instead of in the iteration. In addition, the iteration
function is changed, as the for loop splits by spaces, which leads to an
error for file names with spaces — linebreaks are used instead.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-01 11:04:04 +02:00

36 lines
811 B
Nix

# SPDX-License-Identifier: BSD-3-Clause OR Apache-2.0
{ pkgs, ... }:
pkgs.mkShell rec {
hardeningDisable = [ "all" ];
# Derive build inputs from custom packages
inputsFrom = with pkgs; [
pyd3tn
python-ud3tn-utils
ud3tn
];
# Prepare a virtual python enviroment for development
venvDir = "./.venv";
buildInputs = with pkgs.python3Packages; [ python venvShellHook ];
postVenvCreation = ''
unset SOURCE_DATE_EPOCH
pip install -e ./python-ud3tn-utils
pip install -e ./pyd3tn
'';
postShellHook = "unset SOURCE_DATE_EPOCH";
packages = with pkgs; [
clang-tools
llvmPackages.libcxxClang
nixpkgs-fmt
protobuf
python3Packages.flake8
python3Packages.pytest
python3Packages.pytest-asyncio
sqlite
] ++ lib.optional (stdenv.isLinux) gdb;
}