mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
39 lines
1.2 KiB
Nix
39 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, deno
|
|
, makeWrapper
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "silverbullet";
|
|
version = "0.7.7";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/silverbulletmd/silverbullet/releases/download/${finalAttrs.version}/silverbullet.js";
|
|
hash = "sha256-EhHPysliRi1bv/skS4+ljQW6qFsijmSup1+7/fVfFdg=";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/{bin,lib}
|
|
cp $src $out/lib/silverbullet.js
|
|
makeWrapper ${lib.getExe deno} $out/bin/silverbullet \
|
|
--set DENO_NO_UPDATE_CHECK "1" \
|
|
--add-flags "run -A --unstable-kv --unstable-worker-options ${placeholder "out"}/lib/silverbullet.js"
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/silverbulletmd/silverbullet/blob/${finalAttrs.version}/website/CHANGELOG.md";
|
|
description = "Open-source, self-hosted, offline-capable Personal Knowledge Management (PKM) web application";
|
|
homepage = "https://silverbullet.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ aorith ];
|
|
mainProgram = "silverbullet";
|
|
inherit (deno.meta) platforms;
|
|
};
|
|
})
|