genealogos: init at 1.0.0 (#309849)

This commit is contained in:
Silvan Mosberger
2025-03-19 22:49:21 +01:00
committed by GitHub
3 changed files with 2941 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,63 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
}:
let
mkGenealogosPackage =
{
crate ? "cli",
}:
rustPlatform.buildRustPackage rec {
pname = "genealogos-${crate}";
version = "1.0.0";
src = fetchFromGitHub {
owner = "tweag";
repo = "genealogos";
rev = "v${version}";
hash = "sha256-EQrKInsrqlpjySX6duylo++2qwglB3EqGfLFJucOQM8=";
# Genealogos' fixture tests contain valid nix store paths, and are thus incompatible with a fixed-output-derivation.
# To avoid this, we just remove the tests
postFetch = ''
rm -r $out/genealogos/tests/
'';
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"nixtract-0.3.0" = "sha256-fXM6Gle4dt1iJgI6NuPl9l00i5sXGYkE+sUvFdps44s=";
};
};
cargoBuildFlags = [
"-p"
"genealogos-${crate}"
];
cargoTestFlags = cargoBuildFlags;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
# Since most tests were removed, just skip testing
doCheck = false;
meta = with lib; {
description = "A Nix sbom generator";
homepage = "https://github.com/tweag/genealogos";
license = licenses.mit;
maintainers = with maintainers; [ erin ];
changelog = "https://github.com/tweag/genealogos/blob/${src.rev}/CHANGELOG.md";
mainProgram = "genealogos";
platforms = lib.platforms.unix;
};
};
in
{
genealogos-cli = mkGenealogosPackage { };
genealogos-api = mkGenealogosPackage { crate = "api"; };
}
+2
View File
@@ -1000,6 +1000,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa VideoToolbox;
};
inherit (callPackage ../development/tools/genealogos { }) genealogos-cli genealogos-api;
# This is to workaround gfal2-python broken against Python 3.12 or later.
# TODO: Remove these lines after solving the breakage.
gfal2-util = callPackage ../by-name/gf/gfal2-util/package.nix (lib.optionalAttrs python3Packages.gfal2-python.meta.broken {