nixpkgs/pkgs/by-name/si/signal-backup-deduplicator/package.nix
Artturin e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00

39 lines
899 B
Nix

{
lib,
stdenv,
fetchFromGitLab,
cmake,
cryptopp,
protobuf,
}:
stdenv.mkDerivation {
pname = "signal-backup-deduplicator";
version = "0-unstable-2024-05-24";
src = fetchFromGitLab {
owner = "gerum";
repo = "signal-backup-deduplicator";
rev = "6c09f14b16ff47c2ed0914c68102e45c93ebbfa6";
hash = "sha256-JR2Qu4EtTMObM/BvxQS5WwGFqWj9g0bqOpKt4y5UNaM=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
protobuf
cryptopp
];
meta = {
description = "Generate chunked backups for Signal messages";
homepage = "https://gitlab.com/gerum/signal-backup-deduplicator";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ GaetanLepage ];
mainProgram = "signal_backup_deduplicate";
platforms = lib.platforms.all;
# ld: symbol(s) not found for architecture ...
broken = stdenv.hostPlatform.isDarwin;
};
}