diff options
Diffstat (limited to 'pkgs/by-name/de')
-rw-r--r-- | pkgs/by-name/de/deltachat-desktop/package.nix | 152 | ||||
-rw-r--r-- | pkgs/by-name/de/devhelp/package.nix | 2 | ||||
-rw-r--r-- | pkgs/by-name/de/dezoomify-rs/package.nix | 33 |
3 files changed, 186 insertions, 1 deletions
diff --git a/pkgs/by-name/de/deltachat-desktop/package.nix b/pkgs/by-name/de/deltachat-desktop/package.nix new file mode 100644 index 000000000000..bf70d4672a05 --- /dev/null +++ b/pkgs/by-name/de/deltachat-desktop/package.nix @@ -0,0 +1,152 @@ +{ lib +, buildNpmPackage +, copyDesktopItems +, electron_30 +, buildGoModule +, esbuild +, fetchFromGitHub +, jq +, deltachat-rpc-server +, makeDesktopItem +, makeWrapper +, noto-fonts-color-emoji +, pkg-config +, python3 +, roboto +, sqlcipher +, stdenv +, darwin +, testers +, deltachat-desktop +}: + +let + electron = electron_30; + esbuild' = esbuild.override { + buildGoModule = args: buildGoModule (args // rec { + version = "0.19.12"; + src = fetchFromGitHub { + owner = "evanw"; + repo = "esbuild"; + rev = "v${version}"; + hash = "sha256-NQ06esCSU6YPvQ4cMsi3DEFGIQGl8Ff6fhdTxUAyGvo="; + }; + vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ="; + }); + }; +in +buildNpmPackage rec { + pname = "deltachat-desktop"; + version = "1.46.5"; + + src = fetchFromGitHub { + owner = "deltachat"; + repo = "deltachat-desktop"; + rev = "v${version}"; + hash = "sha256-u/2/lCQpUf5bxKPseHz6SFmiW0m9SywuA5Ng3BBnX88="; + }; + + npmDepsHash = "sha256-jnuSL0yr6E8P0Tev9rMsfCLs59WStaH19DhZe0zthmw="; + + nativeBuildInputs = [ + jq + makeWrapper + pkg-config + python3 + ] ++ lib.optionals stdenv.isLinux [ + copyDesktopItems + ]; + + buildInputs = [ + deltachat-rpc-server + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreServices + ]; + + env = { + ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; + ESBUILD_BINARY_PATH = "${esbuild'}/bin/esbuild"; + USE_SYSTEM_LIBDELTACHAT = "true"; + VERSION_INFO_GIT_REF = src.rev; + }; + + preBuild = '' + test \ + $(jq -r '.packages."node_modules/@deltachat/jsonrpc-client".version' package-lock.json) \ + = ${deltachat-rpc-server.version} \ + || (echo "error: deltachat-rpc-server version does not match jsonrpc-client" && exit 1) + + test \ + $(jq -r '.packages."node_modules/electron".version' package-lock.json | grep -E -o "^[0-9]+") \ + = ${lib.versions.major electron.version} \ + || (echo 'error: electron version doesn not match package-lock.json' && exit 1) + + rm node_modules/@deltachat/stdio-rpc-server-*/deltachat-rpc-server + ln -s ${lib.getExe deltachat-rpc-server} node_modules/@deltachat/stdio-rpc-server-linux-* + ''; + + npmBuildScript = "build4production"; + + installPhase = '' + runHook preInstall + + npm prune --production + + mkdir -p $out/lib/node_modules/deltachat-desktop + cp -r . $out/lib/node_modules/deltachat-desktop + + awk '!/^#/ && NF' build/packageignore_list \ + | xargs -I {} sh -c "rm -rf $out/lib/node_modules/deltachat-desktop/{}" || true + + # required for electron to import index.js as a module + cp package.json $out/lib/node_modules/deltachat-desktop + + install -D build/icon.png \ + $out/share/icons/hicolor/scalable/apps/deltachat.png + + ln -sf ${noto-fonts-color-emoji}/share/fonts/noto/NotoColorEmoji.ttf \ + $out/lib/node_modules/deltachat-desktop/html-dist/fonts/noto/emoji + for font in $out/lib/node_modules/deltachat-desktop/html-dist/fonts/Roboto-*.ttf; do + ln -sf ${roboto}/share/fonts/truetype/$(basename $font) \ + $out/lib/node_modules/deltachat-desktop/html-dist/fonts + done + + makeWrapper ${lib.getExe electron} $out/bin/deltachat \ + --set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher${stdenv.hostPlatform.extensions.sharedLibrary} \ + --add-flags $out/lib/node_modules/deltachat-desktop + + runHook postInstall + ''; + + desktopItems = lib.singleton (makeDesktopItem { + name = "deltachat"; + exec = "deltachat %u"; + icon = "deltachat"; + desktopName = "Delta Chat"; + genericName = "Delta Chat"; + comment = meta.description; + categories = [ "Network" "InstantMessaging" "Chat" ]; + startupWMClass = "DeltaChat"; + mimeTypes = [ + "x-scheme-handler/openpgp4fpr" + "x-scheme-handler/dcaccount" + "x-scheme-handler/dclogin" + "x-scheme-handler/mailto" + ]; + }); + + passthru.tests = { + version = testers.testVersion { + package = deltachat-desktop; + }; + }; + + meta = with lib; { + description = "Email-based instant messaging for Desktop"; + homepage = "https://github.com/deltachat/deltachat-desktop"; + changelog = "https://github.com/deltachat/deltachat-desktop/blob/${src.rev}/CHANGELOG.md"; + license = licenses.gpl3Plus; + mainProgram = "deltachat"; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/by-name/de/devhelp/package.nix b/pkgs/by-name/de/devhelp/package.nix index 97795c1d9f7a..54991136da64 100644 --- a/pkgs/by-name/de/devhelp/package.nix +++ b/pkgs/by-name/de/devhelp/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "devdoc" ]; src = fetchurl { - url = "mirror://gnome/sources/devhelp/${lib.versions.major version}/${pname}-${version}.tar.xz"; + url = "mirror://gnome/sources/devhelp/${lib.versions.major version}/devhelp-${version}.tar.xz"; sha256 = "Y87u/QU5LgIESIHvHs1yQpNVPaVzW378CCstE/6F3QQ="; }; diff --git a/pkgs/by-name/de/dezoomify-rs/package.nix b/pkgs/by-name/de/dezoomify-rs/package.nix new file mode 100644 index 000000000000..d2660fff82ab --- /dev/null +++ b/pkgs/by-name/de/dezoomify-rs/package.nix @@ -0,0 +1,33 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, +}: + +rustPlatform.buildRustPackage rec { + pname = "dezoomify-rs"; + version = "2.12.4"; + + src = fetchFromGitHub { + owner = "lovasoa"; + repo = "dezoomify-rs"; + rev = "refs/tags/v${version}"; + hash = "sha256-7CRwlnIItJ89qqemkJbx5QjcLrwYrvpcjVYX5ZWP0W4="; + }; + + cargoHash = "sha256-v48eM43+/dt2M1J9yfjfTpBetv6AA2Hhzu8rrL3gojg="; + + checkFlags = [ + # Tests failing due to networking errors in Nix build environment + "--skip=local_generic_tiles" + "--skip=custom_size_local_zoomify_tiles" + ]; + + meta = { + description = "Zoomable image downloader for Google Arts & Culture, Zoomify, IIIF, and others"; + homepage = "https://github.com/lovasoa/dezoomify-rs/"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ fsagbuya ]; + mainProgram = "dezoomify-rs"; + }; +} |