depot/third_party/nixpkgs/pkgs/by-name/do/dokieli/package.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

58 lines
1.3 KiB
Nix

{
lib,
mkYarnPackage,
fetchFromGitHub,
fetchYarnDeps,
makeWrapper,
nodejs,
xsel,
}:
mkYarnPackage rec {
pname = "dokieli";
version = "0-unstable-2024-09-23";
src = fetchFromGitHub {
owner = "linkeddata";
repo = "dokieli";
rev = "40ebbc60ba48d8b08f763b07befba96382c5f027";
hash = "sha256-lc96jOR8uXLcZFhN3wpSd9O5cUdKxllB8WWCh2oWuEw=";
};
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
hash = "sha256-TEXCCLFhpwHZJ8zRGsC7J6EwNaFpIi+CZ3L5uilebK4=";
};
packageJSON = ./package.json;
installPhase = ''
mkdir -p $out/bin
cp -r * $out
'';
nativeBuildInputs = [ makeWrapper ];
postFixup = ''
makeWrapper ${nodejs}/bin/npx $out/bin/dokieli \
--prefix PATH : ${
lib.makeBinPath ([
nodejs
xsel
])
} \
--add-flags serve \
--chdir $out/deps/dokieli
'';
doDist = false;
meta = {
description = "dokieli is a clientside editor for decentralised article publishing, annotations and social interactions";
homepage = "https://github.com/linkeddata/dokieli";
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ shogo ];
mainProgram = "dokieli";
};
}