feat(packages): package inkdrop
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
# https://handy.computer/
|
||||||
{
|
{
|
||||||
appimageTools,
|
appimageTools,
|
||||||
fetchurl,
|
fetchurl,
|
||||||
|
|||||||
149
packages/inkdrop.nix
Normal file
149
packages/inkdrop.nix
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
# https://www.inkdrop.app/
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
fetchurl,
|
||||||
|
stdenv,
|
||||||
|
autoPatchelfHook,
|
||||||
|
makeWrapper,
|
||||||
|
wrapGAppsHook3,
|
||||||
|
alsa-lib,
|
||||||
|
at-spi2-atk,
|
||||||
|
at-spi2-core,
|
||||||
|
cairo,
|
||||||
|
cups,
|
||||||
|
dbus,
|
||||||
|
expat,
|
||||||
|
gdk-pixbuf,
|
||||||
|
glib,
|
||||||
|
gtk3,
|
||||||
|
libdrm,
|
||||||
|
libnotify,
|
||||||
|
libpulseaudio,
|
||||||
|
libsecret,
|
||||||
|
libuuid,
|
||||||
|
libxkbcommon,
|
||||||
|
mesa,
|
||||||
|
nspr,
|
||||||
|
nss,
|
||||||
|
pango,
|
||||||
|
systemd,
|
||||||
|
libx11,
|
||||||
|
libxscrnsaver,
|
||||||
|
libxcomposite,
|
||||||
|
libxcursor,
|
||||||
|
libxdamage,
|
||||||
|
libxext,
|
||||||
|
libxfixes,
|
||||||
|
libxi,
|
||||||
|
libxrandr,
|
||||||
|
libxrender,
|
||||||
|
libxtst,
|
||||||
|
libxcb,
|
||||||
|
libxkbfile,
|
||||||
|
libxshmfence,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "inkdrop";
|
||||||
|
version = "5.11.8";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://dist.inkdrop.app/v${version}/${pname}_${version}_amd64.deb";
|
||||||
|
hash = "sha256-8aJSeUi5K9PgNJvfYAtnRnI2t+vM10jiqVAZmX+zni0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
autoPatchelfHook
|
||||||
|
makeWrapper
|
||||||
|
wrapGAppsHook3
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
alsa-lib
|
||||||
|
at-spi2-atk
|
||||||
|
at-spi2-core
|
||||||
|
cairo
|
||||||
|
cups
|
||||||
|
dbus
|
||||||
|
expat
|
||||||
|
gdk-pixbuf
|
||||||
|
glib
|
||||||
|
gtk3
|
||||||
|
libdrm
|
||||||
|
libnotify
|
||||||
|
libpulseaudio
|
||||||
|
libsecret
|
||||||
|
libuuid
|
||||||
|
libxkbcommon
|
||||||
|
mesa
|
||||||
|
nspr
|
||||||
|
nss
|
||||||
|
pango
|
||||||
|
systemd
|
||||||
|
libx11
|
||||||
|
libxscrnsaver
|
||||||
|
libxcomposite
|
||||||
|
libxcursor
|
||||||
|
libxdamage
|
||||||
|
libxext
|
||||||
|
libxfixes
|
||||||
|
libxi
|
||||||
|
libxrandr
|
||||||
|
libxrender
|
||||||
|
libxtst
|
||||||
|
libxcb
|
||||||
|
libxkbfile
|
||||||
|
libxshmfence
|
||||||
|
];
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
dontConfigure = true;
|
||||||
|
|
||||||
|
# Ignore musl dependency since we're using glibc
|
||||||
|
autoPatchelfIgnoreMissingDeps = [ "libc.musl-x86_64.so.1" ];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
runHook preUnpack
|
||||||
|
|
||||||
|
# Extract deb file manually to avoid setuid issues
|
||||||
|
ar x $src
|
||||||
|
tar xf data.tar.xz --no-same-permissions --no-same-owner
|
||||||
|
|
||||||
|
runHook postUnpack
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
# Create output directories
|
||||||
|
mkdir -p $out/bin $out/share
|
||||||
|
|
||||||
|
# Copy the main application
|
||||||
|
cp -r usr/lib/inkdrop $out/share/inkdrop
|
||||||
|
|
||||||
|
# Copy desktop file and icon
|
||||||
|
cp -r usr/share/applications $out/share/
|
||||||
|
cp -r usr/share/pixmaps $out/share/
|
||||||
|
|
||||||
|
# Fix desktop file to use absolute paths
|
||||||
|
substituteInPlace $out/share/applications/inkdrop.desktop \
|
||||||
|
--replace-quiet "Exec=inkdrop" "Exec=$out/bin/inkdrop" \
|
||||||
|
--replace-quiet "Icon=inkdrop" "Icon=$out/share/pixmaps/inkdrop.png"
|
||||||
|
|
||||||
|
# Create wrapper script in bin
|
||||||
|
makeWrapper $out/share/inkdrop/inkdrop $out/bin/inkdrop \
|
||||||
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
|
||||||
|
--set-default ELECTRON_IS_DEV 0 \
|
||||||
|
--inherit-argv0
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Notebook app for Markdown lovers";
|
||||||
|
homepage = "https://www.inkdrop.app/";
|
||||||
|
license = licenses.unfree;
|
||||||
|
maintainers = [ ];
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
mainProgram = "inkdrop";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
with lib; let
|
with lib; let
|
||||||
inherit (pkgs.stdenv.hostPlatform) system;
|
inherit (pkgs.stdenv.hostPlatform) system;
|
||||||
handy = pkgs.callPackage ../../packages/handy.nix {};
|
handy = pkgs.callPackage ../../packages/handy.nix {};
|
||||||
|
inkdrop = pkgs.callPackage ../../packages/inkdrop.nix {};
|
||||||
pumo-system-info = inputs.pumo-system-info.packages.${system}.default;
|
pumo-system-info = inputs.pumo-system-info.packages.${system}.default;
|
||||||
zen = inputs.zen-browser.packages.${system}.default;
|
zen = inputs.zen-browser.packages.${system}.default;
|
||||||
in {
|
in {
|
||||||
@@ -72,6 +73,7 @@ in {
|
|||||||
# Dev
|
# Dev
|
||||||
dbeaver-bin
|
dbeaver-bin
|
||||||
devenv
|
devenv
|
||||||
|
inkdrop
|
||||||
nodejs
|
nodejs
|
||||||
sqlite
|
sqlite
|
||||||
tectonic # better LaTeX engine
|
tectonic # better LaTeX engine
|
||||||
|
|||||||
Reference in New Issue
Block a user