Skip to content

Commit

Permalink
atomic-{browser,cli,server}: 0.37.0 -> 0.39.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wegank authored and fricklerhandwerk committed Sep 12, 2024
1 parent 30c4303 commit 188cc07
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 54 deletions.
29 changes: 12 additions & 17 deletions pkgs/by-name/atomic-browser/package.nix
Original file line number Diff line number Diff line change
@@ -1,44 +1,39 @@
{
callPackage,
stdenv,
fetchFromGitHub,
nodejs,
pnpm_8,
pnpm,
lib,
nodePackages,
atomic-server,
}:
stdenv.mkDerivation rec {
pname = "atomic-browser";
version = "v0.37.0";
inherit (atomic-server) version;
src = "${atomic-server.src}/browser";

monorepoSrc = fetchFromGitHub {
owner = "atomicdata-dev";
repo = "atomic-server";
rev = "v0.37.0";
hash = "sha256-+Lk2MvkTj+B+G6cNbWAbPrN5ECiyMJ4HSiiLzBLd74g=";
};

src = "${monorepoSrc}/browser";
pnpmDeps = pnpm_8.fetchDeps {
pnpmDeps = pnpm.fetchDeps {
inherit src pname;
hash = "sha256-sXXEgMBKImeGIYrFw17Uie6qTylKrJ9MNm8WJFRAi1A=";
hash = "sha256-du+frFmNV1A4PE8iCRHETEqL0jVhtcxgOA+DhQnnRXg=";
};

nativeBuildInputs = [
nodejs
pnpm_8.configHook
pnpm.configHook
];

postBuild = ''
pnpm run build
'';

installPhase = ''
runHook preInstall
cp -R ./data-browser/dist/ $out/
runHook postInstall
'';

meta = {
description = "Create, share, fetch and model linked Atomic Data! There are three components: a javascript / typescript library, a react library, and a complete GUI: Atomic-Data Browser.";
description = "A GUI for viewing, editing and browsing Atomic Data";
homepage = "https://github.com/atomicdata-dev/atomic-server/tree/develop/browser";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [];
Expand Down
43 changes: 12 additions & 31 deletions pkgs/by-name/atomic-cli/package.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
{
lib,
rustPlatform,
fetchCrate,
stdenv,
}: let
inherit
(lib)
licenses
maintainers
;
in
rustPlatform.buildRustPackage rec {
pname = "atomic-cli";
version = "0.37.0";

src = fetchCrate {
inherit pname version;
hash = "sha256-yKYqxja2XFrQmLZYiWJAJDfGDdnr4eNdAwZNKn4FseU=";
};

cargoHash = "sha256-a/mkZ9LFItlc3fBNCSZntbZfBJnhiFWUDIjLfBO6H74=";

doCheck = false; # TODO(jl): broken upstream

meta = {
description = "CLI tool to create, store, query, validate and convert Atomic Data";
homepage = "https://crates.io/crates/atomic-cli";
license = licenses.mit;
maintainers = with maintainers; [];
};
}
runCommand,
atomic-server,
}:
runCommand "atomic-cli" {
meta = {
inherit (atomic-server.meta) description homepage license;
mainProgram = "atomic-cli";
};
} ''
mkdir -p "$out/bin"
ln -s "${atomic-server}/bin/atomic-cli" "$out/bin/atomic-cli"
''
16 changes: 10 additions & 6 deletions pkgs/by-name/atomic-server/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
fetchFromGitHub,
rustPlatform,
atomic-browser,
nasm,
}: let
inherit
(lib)
Expand All @@ -11,16 +12,16 @@
in
rustPlatform.buildRustPackage rec {
pname = "atomic-server";
version = "0.37.0";
version = "0.39.0";

src = fetchFromGitHub {
owner = "atomicdata-dev";
repo = pname;
repo = "atomic-server";
rev = "v${version}";
hash = "sha256-+Lk2MvkTj+B+G6cNbWAbPrN5ECiyMJ4HSiiLzBLd74g=";
hash = "sha256-qqk+yliCpIHfazGY8dkW3CkIKk6paEn/EhJWLO4zgNQ=";
};

cargoHash = "sha256-cSv1XnuzL5PxVOTAUiyiQsMHSRUMaFDkW2/4Bt75G9o=";
cargoHash = "sha256-2HZn6gs71Aw+44AqeYmelgjj9W2gZBA5Udmg3JMPP6o=";

# server/assets_tmp is the directory atomic-server's build will check for
# compiled frontend assets to decide whether to rebuild or not
Expand All @@ -30,11 +31,14 @@ in
cp -r ${atomic-browser}/* source/server/assets_tmp
'';

nativeBuildInputs = [nasm];

doCheck = false; # TODO(jl): broken upstream

meta = {
description = "A Rust library to serialize, parse, store, convert, validate, edit, fetch and store Atomic Data. Powers both atomic-cli and atomic-server.";
homepage = "docs.atomicdata.dev";
description = "Reference implementation for the Atomic Data specification";
homepage = "https://docs.atomicdata.dev";
license = licenses.mit;
mainProgram = "atomic-server";
};
}

0 comments on commit 188cc07

Please sign in to comment.