delineate: init at 0.1.0 (#378882)

This commit is contained in:
Sandro 2025-02-17 23:52:05 +01:00 committed by GitHub
commit 16afea59f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 118 additions and 0 deletions

View File

@ -16402,6 +16402,12 @@
githubId = 43587167;
name = "Nikita Tikhonov";
};
nekowinston = {
email = "hey@winston.sh";
github = "nekowinston";
githubId = 79978224;
name = "winston";
};
nelsonjeppesen = {
email = "nix@jeppesen.io";
github = "NelsonJeppesen";

View File

@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index 616ccff..d32b4c5 100644
--- a/meson.build
+++ b/meson.build
@@ -29,7 +29,7 @@ version = meson.project_version()
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
localedir = prefix / get_option('localedir')
-graphviewsrcdir = prefix / 'src/delineate/graph_view'
+graphviewsrcdir = prefix / 'opt/delineate/graph_view'
datadir = prefix / get_option('datadir')
pkgdatadir = datadir / meson.project_name()

View File

@ -0,0 +1,99 @@
{
appstream,
buildNpmPackage,
cargo,
cmake,
desktop-file-utils,
fetchFromGitHub,
gtk4,
gtksourceview5,
lib,
libadwaita,
meson,
ninja,
nix-update-script,
pkg-config,
rustPlatform,
rustc,
stdenv,
webkitgtk_6_0,
wrapGAppsHook4,
}:
let
d3-graphviz = buildNpmPackage rec {
pname = "d3-graphviz";
version = "5.6.0";
src = fetchFromGitHub {
owner = "magjac";
repo = "d3-graphviz";
tag = "v${version}";
hash = "sha256-MZhAzR6+GIBTsLPJq5NqaEPHjiBMgYBJ0hFbDPNPgFk=";
};
npmDepsHash = "sha256-J1kptumP/8UoiYDM+AJOYUne0OSkMXCTAXW3ZmavU4E=";
# keep the devDependencies, as Delineate imports d3 via node_modules
# https://github.com/SeaDve/Delineate/blob/v0.1.0/data/graph_view/index.html#L10-L11
npmPruneFlags = "--include=dev";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "delineate";
version = "0.1.0";
src = fetchFromGitHub {
owner = "SeaDve";
repo = "Delineate";
tag = "v${finalAttrs.version}";
hash = "sha256-dFGh7clxc6UxQRTsNKrggWDvL3CPmzJmrvO1jqMVoTg=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) src;
hash = "sha256-RtQnpbjULtnvlc71L4KIKPES0WRSY2GoaIwt8UvlYOA=";
};
patches = [
./graphview-dir.patch
];
nativeBuildInputs = [
cargo
cmake
desktop-file-utils
gtk4
meson
ninja
pkg-config
rustPlatform.bindgenHook
rustPlatform.cargoSetupHook
rustc
wrapGAppsHook4
];
buildInputs = [
appstream
gtksourceview5
libadwaita
webkitgtk_6_0
];
dontUseCmakeConfigure = true;
postInstall = ''
ln -s ${d3-graphviz}/lib/node_modules/d3-graphviz $out/opt/delineate/graph_view/d3-graphviz
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "View and edit graphs";
homepage = "https://github.com/SeaDve/Delineate";
changelog = "https://github.com/SeaDve/Delineate/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Plus;
maintainers = [ lib.maintainers.nekowinston ];
platforms = lib.platforms.linux;
mainProgram = "delineate";
};
})