mirror of
https://gitlab.com/d3tn/ud3tn.git
synced 2026-08-13 12:33:27 +02:00
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>
52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
# SPDX-License-Identifier: BSD-3-Clause OR Apache-2.0
|
|
|
|
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
};
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
systems = [
|
|
"aarch64-darwin"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"x86_64-linux"
|
|
];
|
|
|
|
forAllSystems = fn: nixpkgs.lib.genAttrs systems (
|
|
system: fn rec {
|
|
pkgs = import nixpkgs { inherit system; };
|
|
}
|
|
);
|
|
in
|
|
{
|
|
apps = forAllSystems ({ pkgs, ... }: {
|
|
default = {
|
|
type = "app";
|
|
program = "${self.packages.${pkgs.system}.ud3tn}/bin/ud3tn";
|
|
};
|
|
});
|
|
|
|
packages = forAllSystems ({ pkgs, ... }:
|
|
import ./nix/packages.nix { inherit pkgs; }
|
|
);
|
|
|
|
checks = forAllSystems ({ pkgs, ... }: import ./nix/tests {
|
|
pkgs = pkgs.extend self.overlays.default;
|
|
nixosModules = self.nixosModules;
|
|
});
|
|
|
|
devShells = forAllSystems ({ pkgs, ... }: {
|
|
default = import ./nix/shell.nix { pkgs = pkgs.extend self.overlays.default; };
|
|
});
|
|
|
|
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixpkgs-fmt);
|
|
|
|
overlays.default = final: prev: {
|
|
inherit (self.packages.${final.system}) ud3tn pyd3tn python-ud3tn-utils;
|
|
};
|
|
|
|
nixosModules.default = import ./nix/module.nix;
|
|
};
|
|
}
|