mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
e0464e4788
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" ```
59 lines
1.4 KiB
Nix
59 lines
1.4 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, openssl
|
|
, sqlite
|
|
, stdenv
|
|
, darwin
|
|
, nixosTests
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "mollysocket";
|
|
version = "1.4.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mollyim";
|
|
repo = "mollysocket";
|
|
rev = version;
|
|
hash = "sha256-vE5J4BKYmVqtowfxDDTOwFKws7phYRm9xKFPiDNuNn4=";
|
|
};
|
|
|
|
cargoHash = "sha256-s/EhX5o6XuUqcrqhXY274MyWhRukgetfIZKQ4XNlq6Y=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
sqlite
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.Security
|
|
];
|
|
|
|
checkFlags = [
|
|
# tests interact with Signal servers
|
|
"--skip=config::tests::check_wildcard_endpoint"
|
|
"--skip=utils::post_allowed::tests::test_allowed"
|
|
"--skip=utils::post_allowed::tests::test_not_allowed"
|
|
"--skip=utils::post_allowed::tests::test_post"
|
|
"--skip=ws::tls::tests::connect_untrusted_server"
|
|
"--skip=ws::tls::tests::connect_trusted_server"
|
|
];
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests) mollysocket;
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://github.com/mollyim/mollysocket/releases/tag/${version}";
|
|
description = "Get Signal notifications via UnifiedPush";
|
|
homepage = "https://github.com/mollyim/mollysocket";
|
|
license = lib.licenses.agpl3Plus;
|
|
mainProgram = "mollysocket";
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
};
|
|
}
|