72 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2024-09-27 23:40:10 +05:30
{
lib,
fetchFromGitHub,
makeWrapper,
2025-07-07 14:22:00 +08:00
nix-update-script,
nodePackages,
stdenv,
2024-09-27 23:40:10 +05:30
xsel,
yarn-berry_4,
2024-09-27 23:40:10 +05:30
}:
let
yarn-berry = yarn-berry_4;
in
stdenv.mkDerivation (finalAttrs: {
2024-09-27 23:40:10 +05:30
pname = "dokieli";
version = "0-unstable-2025-08-04";
2024-09-27 23:40:10 +05:30
src = fetchFromGitHub {
owner = "dokieli";
2024-09-27 23:40:10 +05:30
repo = "dokieli";
rev = "64374c6b9a53b68ae7921604a1fbe231d3e4f067";
hash = "sha256-5baBKXmOxS0BOKNedMSbmw21rDBONZwmim9hlXn5OzQ=";
2024-09-27 23:40:10 +05:30
};
missingHashes = ./missing-hashes.json;
offlineCache = yarn-berry.fetchYarnBerryDeps {
inherit (finalAttrs) src missingHashes;
hash = "sha256-4SK1ecjEnnaow5Z2biCPaHirpX6J/5cytQWWicPgmB0=";
2024-09-27 23:40:10 +05:30
};
installPhase = ''
runHook preInstall
2024-09-27 23:40:10 +05:30
mkdir -p $out/bin
cp -r * $out
runHook postInstall
2024-09-27 23:40:10 +05:30
'';
nativeBuildInputs = [
makeWrapper
yarn-berry.yarnBerryConfigHook
];
2024-09-27 23:40:10 +05:30
postFixup =
let
serve = lib.getExe' nodePackages.serve "serve";
in
''
makeWrapper ${serve} $out/bin/dokieli \
--prefix PATH : ${lib.makeBinPath [ xsel ]} \
--chdir $out
'';
2024-09-27 23:40:10 +05:30
2025-07-07 14:22:00 +08:00
passthru.updateScript = nix-update-script {
extraArgs = [ "--version=branch" ];
};
2024-09-27 23:40:10 +05:30
meta = {
2025-07-07 13:18:10 +08:00
description = "Clientside editor for decentralised article publishing, annotations and social interactions";
2024-09-27 23:40:10 +05:30
homepage = "https://github.com/linkeddata/dokieli";
2025-07-07 13:18:10 +08:00
license = with lib.licenses; [
cc-by-40
mit
];
2024-09-27 23:40:10 +05:30
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ shogo ];
teams = [ lib.teams.ngi ];
2024-09-27 23:40:10 +05:30
mainProgram = "dokieli";
};
})