2024-08-30 20:36:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-08-30 20:39:19 +00:00
|
|
|
libGL,
|
2024-08-30 20:36:29 +00:00
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
undmg,
|
|
|
|
dpkg,
|
|
|
|
autoPatchelfHook,
|
|
|
|
wrapGAppsHook3,
|
|
|
|
alsa-lib,
|
|
|
|
at-spi2-atk,
|
|
|
|
gdk-pixbuf,
|
|
|
|
nss,
|
|
|
|
udev,
|
|
|
|
gnome-keyring,
|
|
|
|
mesa,
|
|
|
|
gtk3,
|
|
|
|
libusb1,
|
|
|
|
libsecret,
|
|
|
|
libappindicator,
|
|
|
|
xdotool,
|
2024-08-30 20:40:08 +00:00
|
|
|
libX11,
|
|
|
|
libXcomposite,
|
|
|
|
libXext,
|
|
|
|
libXrandr,
|
|
|
|
libXScrnSaver,
|
|
|
|
libXtst,
|
|
|
|
libxshmfence,
|
2023-01-13 16:48:38 +00:00
|
|
|
}:
|
2020-05-25 15:44:29 +00:00
|
|
|
let
|
|
|
|
pname = "keeweb";
|
2022-09-13 16:15:30 +00:00
|
|
|
version = "1.18.7";
|
2020-05-25 15:44:29 +00:00
|
|
|
|
2021-05-16 12:05:57 +00:00
|
|
|
srcs = {
|
|
|
|
x86_64-linux = fetchurl {
|
2023-01-13 16:48:38 +00:00
|
|
|
url = "https://github.com/keeweb/keeweb/releases/download/v${version}/KeeWeb-${version}.linux.x64.deb";
|
|
|
|
hash = "sha256-/U+vn5TLIU9/J6cRFjuAdyGzlwC04mp4L2X2ETp+ZSE=";
|
2021-05-16 12:05:57 +00:00
|
|
|
};
|
|
|
|
x86_64-darwin = fetchurl {
|
|
|
|
url = "https://github.com/keeweb/keeweb/releases/download/v${version}/KeeWeb-${version}.mac.x64.dmg";
|
2022-09-13 16:15:30 +00:00
|
|
|
hash = "sha256-+ZFGrrw0tZ7F6lb/3iBIyGD+tp1puVhkPv10hfp6ATU=";
|
2021-05-16 12:05:57 +00:00
|
|
|
};
|
|
|
|
aarch64-darwin = fetchurl {
|
|
|
|
url = "https://github.com/keeweb/keeweb/releases/download/v${version}/KeeWeb-${version}.mac.arm64.dmg";
|
2022-09-13 16:15:30 +00:00
|
|
|
hash = "sha256-bkhwsWYLkec16vMOfXUce7jfrmI9W2xHiZvU1asebK4=";
|
2021-05-16 12:05:57 +00:00
|
|
|
};
|
2020-05-25 15:44:29 +00:00
|
|
|
};
|
2024-08-30 20:36:29 +00:00
|
|
|
src =
|
|
|
|
srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2020-05-25 15:44:29 +00:00
|
|
|
|
2023-01-13 16:48:38 +00:00
|
|
|
libraries = [
|
|
|
|
alsa-lib
|
|
|
|
at-spi2-atk
|
|
|
|
gdk-pixbuf
|
2024-08-30 20:39:19 +00:00
|
|
|
libGL
|
2023-01-13 16:48:38 +00:00
|
|
|
nss
|
|
|
|
udev
|
2024-08-30 20:40:08 +00:00
|
|
|
libX11
|
|
|
|
libXcomposite
|
|
|
|
libXext
|
|
|
|
libXrandr
|
|
|
|
libXScrnSaver
|
|
|
|
libXtst
|
|
|
|
libxshmfence
|
2024-06-22 14:46:12 +00:00
|
|
|
gnome-keyring
|
2023-01-13 16:48:38 +00:00
|
|
|
mesa
|
|
|
|
gtk3
|
|
|
|
libusb1
|
|
|
|
libsecret
|
|
|
|
libappindicator
|
|
|
|
xdotool
|
|
|
|
];
|
2020-05-25 15:44:29 +00:00
|
|
|
|
2024-08-30 20:41:01 +00:00
|
|
|
meta = {
|
2020-05-25 15:44:29 +00:00
|
|
|
description = "Free cross-platform password manager compatible with KeePass";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "keeweb";
|
2020-05-25 15:44:29 +00:00
|
|
|
homepage = "https://keeweb.info/";
|
2021-03-09 19:33:10 +00:00
|
|
|
changelog = "https://github.com/keeweb/keeweb/blob/v${version}/release-notes.md";
|
2024-08-30 20:41:01 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ sikmir ];
|
2021-05-16 12:05:57 +00:00
|
|
|
platforms = builtins.attrNames srcs;
|
2020-05-25 15:44:29 +00:00
|
|
|
};
|
2023-01-13 16:48:38 +00:00
|
|
|
in
|
2024-09-24 15:50:49 +00:00
|
|
|
if stdenv.hostPlatform.isDarwin then
|
2024-08-30 20:36:29 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
meta
|
|
|
|
;
|
2020-05-25 15:44:29 +00:00
|
|
|
|
2024-08-30 20:36:29 +00:00
|
|
|
nativeBuildInputs = [ undmg ];
|
2020-05-25 15:44:29 +00:00
|
|
|
|
2024-08-30 20:36:29 +00:00
|
|
|
sourceRoot = ".";
|
2020-05-25 15:44:29 +00:00
|
|
|
|
2024-08-30 20:36:29 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
cp -r *.app $out/Applications
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
meta
|
|
|
|
;
|
2020-05-25 15:44:29 +00:00
|
|
|
|
2024-08-30 20:36:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
wrapGAppsHook3
|
2024-11-26 20:00:18 +00:00
|
|
|
dpkg
|
2024-08-30 20:36:29 +00:00
|
|
|
];
|
2020-05-25 15:44:29 +00:00
|
|
|
|
2024-08-30 20:36:29 +00:00
|
|
|
buildInputs = libraries;
|
2020-05-25 15:44:29 +00:00
|
|
|
|
2024-08-30 20:36:29 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2023-01-13 16:48:38 +00:00
|
|
|
|
2024-08-30 20:36:29 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r usr/share $out/share
|
2023-01-13 16:48:38 +00:00
|
|
|
|
2024-08-30 20:38:17 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2024-08-30 20:36:29 +00:00
|
|
|
makeWrapper $out/share/keeweb-desktop/keeweb $out/bin/keeweb \
|
|
|
|
--argv0 "keeweb" \
|
|
|
|
--add-flags "$out/share/keeweb-desktop/resources/app.asar" \
|
2024-08-30 20:38:17 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libraries}" \
|
|
|
|
''${gappsWrapperArgs[@]}
|
2024-08-30 20:36:29 +00:00
|
|
|
'';
|
|
|
|
}
|